-
Notifications
You must be signed in to change notification settings - Fork 17
FileManager.getNativeFileURL
Kerri Shotts edited this page Apr 4, 2014
·
1 revision
(part of FileManager)
Parameters:
-
path
- an absolute or relative path -
options
- an object representing thecreate
andexclusive
options
Returns: Promise, resolving to the native URL of the specified path; this only works under Cordova as it isn't part of the FileSystem API spec.
ASYNCHRONOUS
Returns the native URL represented by path
. The URL is obtained by calling toNativeURL
of the associated FileEntry
.
If the file does not exist, options
can look this to create a file:
{
create: true, // or false to not create
exclusive: false // or true to fail if the file already exists when create is true
}
aFileManager.getNativeFileURL ( "path/to/file", {} )
.then ( function ( theFileURL ) { ... } )
.catch ( function ( e ) { console.log ( e ); }
.done ();