Updated Branches: refs/heads/master 80df88110 -> 064d57ed8
[CB-4736] documentation for the requestFileSystem function. Also addresses CB-4617 Project: http://git-wip-us.apache.org/repos/asf/cordova-docs/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-docs/commit/064d57ed Tree: http://git-wip-us.apache.org/repos/asf/cordova-docs/tree/064d57ed Diff: http://git-wip-us.apache.org/repos/asf/cordova-docs/diff/064d57ed Branch: refs/heads/master Commit: 064d57ed82925481f5ae9a7402b8d43ef84b27ac Parents: 80df881 Author: lorinbeer <[email protected]> Authored: Tue Sep 3 14:04:37 2013 -0700 Committer: lorinbeer <[email protected]> Committed: Tue Sep 3 14:04:37 2013 -0700 ---------------------------------------------------------------------- .../file/localfilesystem/localfilesystem.md | 22 ++++++++++++++++++++ 1 file changed, 22 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/064d57ed/docs/en/edge/cordova/file/localfilesystem/localfilesystem.md ---------------------------------------------------------------------- diff --git a/docs/en/edge/cordova/file/localfilesystem/localfilesystem.md b/docs/en/edge/cordova/file/localfilesystem/localfilesystem.md index d559e6f..438ae03 100644 --- a/docs/en/edge/cordova/file/localfilesystem/localfilesystem.md +++ b/docs/en/edge/cordova/file/localfilesystem/localfilesystem.md @@ -102,3 +102,25 @@ The `LocalFileSystem` object methods are defined on the `window` object. <p>Local File System</p> </body> </html> + + +# requestFileSystem + +> Request a file system in which to store application data. + + window.requestFileSystem(type, size, successCallback, errorCallback) + +- __window__: reference to the global window object +- __type__: local file system type, see LocalFileSystem Constants +- __size__: indicates how much storage space, in bytes, the application expects to need +- __successCallback__: invoked with a FileSystem object +- __errorCallback__: invoked if error occurs retrieving file system + +## Request File System Quick Example + + function onSuccess(fileSystem) { + console.log(fileSystem.name); + } + + // request the persistent file system + window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, onSuccess, onError);
