-
Notifications
You must be signed in to change notification settings - Fork 17
FileManager.init
Kerri Shotts edited this page Oct 26, 2013
·
2 revisions
(part of FileManager)
Parameters:
-
type
- type of file system, either PERSISTENT or TEMPORARY. -
quota
- requested quota in bytes
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.
var aFileManager = new _y.FileManager();
aFileManager.init ( aFileManager.PERSISTENT, 1024 * 1024 )
.then ( ... )
.catch ( function ( e ) { console.log ( e ); }
.done ();