Skip to content

FileManager.getNativeURL

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

(part of FileManager)

Parameters:

  • path - a FileEntry or DirectoryEntry or a full path (absolute or relative)

Returns: a native URL pointing to the specified entry. This only works on Cordova -- it is not part of the spec.

Returns a native URL suitable for use in native file operations. If the path is a FileEntry or DirectoryEntry, the fullPath value is used as the path, otherwise the path is assumed to be a string.

If the path is relative, the current working directory is used to build the full path. If the path is absolute, the root DirectoryEntry is used to build the full path.

Unlike other methods, this method doesn't return a promise and it isn't asynchronous. It does not check for the existence of the specified path (if a string) -- it merely appends the path to the path of the current working directory or root directory.

Usage

aFileManager.getNativeURL ( "path/to/entry", {} )
            .then ( function ( theNativeURL ) { ... } )
            .catch ( function ( e ) { console.log ( e ); }
            .done ();
Clone this wiki locally