-
Notifications
You must be signed in to change notification settings - Fork 17
FileManager.initWithOptions
Kerri Shotts edited this page Oct 26, 2013
·
1 revision
(part of FileManager)
Parameters:
-
options
- the an object with specified properties.
Returns: Promise, resolving to the FileManager
ASYNCHRONOUS
Initializes the FileManager by asking for a specific file system and a desired quota. Should the request succeed, the file system is in fileSystem, the requested quota is in requestedQuota, and the granted quota is in actualQuota.
For systems that don't require asking for a quota first, the actualQuota
will always match the requestedQuota
. For systems that allow the quota to be different, the two may not always match.
The options
object should look like this:
{
fileSystemType: aFileManager.PERSISTENT, // or TEMPORARY
requestedQuota: 1024 * 1024 // size in bytes
}
var aFileManager = new _y.FileManager();
aFileManager.initWithOptions ( { fileSystemType: aFileManager.PERSISTENT, requestedQuota: 1024 * 1024 } )
.then ( ... )
.catch ( function ( e ) { console.log ( e ); }
.done ();