Flavio
Flavio

Reputation: 866

phonegap window.requestFileSystem args

What's the purpose of the second argument of this funcion? It's always set to zero, but I've never found out what it's used for.

window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, success, fail);

Upvotes: 3

Views: 1802

Answers (2)

Jayprakash Dubey
Jayprakash Dubey

Reputation: 36447

Syntax : window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, onSuccess, onError);

Description :

Here first parameter can be LocalFileSystem.PERSISTENT/LocalFileSystem.TEMPORARY, second parameter determines Storage Space, third parameter determines success on file access and fourth parameter determines error while file handling.

Upvotes: 2

Tank2005
Tank2005

Reputation: 909

This text is from cordova.js:
@param size indicates how much storage space, in bytes, the application expects to need

It seems that requestFileSystem will fail if the availability of the disk is smaller than size param.

Upvotes: 2

Related Questions