Skip to content

FileManager.getFileURL

Kerri Shotts edited this page Apr 4, 2014 · 1 revision

(part of FileManager)

Parameters:

  • path - an absolute or relative path
  • options - an object representing the create and exclusive options

Returns: Promise, resolving to the URL of the specified path

ASYNCHRONOUS

Returns the URL represented by path. The URL is obtained by calling toURL 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
}

Usage

aFileManager.getDirectoryURL ( "path/to/file", {} )
            .then ( function ( theFileURL ) { ... } )
            .catch ( function ( e ) { console.log ( e ); }
            .done ();
Clone this wiki locally