HTML5 FileEntry
Supported Platform(s)
- BlackBerry PlayBook 1.0+ |
- BlackBerry 10 |
- Ripple Emulator |
API | BB5.0 | BB6.0 | BB7.0 | PB1.0 | PB2.0 | BB10 | Ripple |
---|---|---|---|---|---|---|---|
copyTo | Y | Y | Y | Y | |||
createWriter | Y | Y | Y | Y | |||
file | Y | Y | Y | Y | |||
getMetadata | Y | Y | Y | Y | |||
getParent | Y | Y | Y | Y | |||
moveTo | Y | Y | Y | Y | |||
remove | Y | Y | Y | Y | |||
toURL | Y | Y | Y | Y |
Configuration Document Settings
To use all of the API described for this object, you must ensure the following settings are in your configuration document: |
This API does not require a <feature> element to be declared in the configuration document of your BlackBerry WebWorks Application. |
Permission Elements (PlayBook and BlackBerry 10+) |
---|
This API does not require a <permission> element to be declared in the configuration document of your BlackBerry WebWorks Application. |
Functions
void | copyTo |
void | createWriter |
void | file |
void | getMetadata |
void | getParent |
void | moveTo |
void | remove |
string | toURL |
Functions
void
copyTo
(parent : DirectoryEntry, newName : String, callback: function(), callback : errorCallback)
Copy function to copy a file to another location in the file system.
Supported Platforms | |
---|---|
- BlackBerry PlayBook 1.0+ | |
- BlackBerry 10 | |
- Ripple Emulator |
Parameters | |
---|---|
parent | directory to copy the file to |
newName | New file name. |
callback | function to execute when it is successful |
callback | function to execute when there is a failure |
void
createWriter
(callback: function(), callback: function())
creates the writer to write into the file
Supported Platforms | |
---|---|
- BlackBerry PlayBook 1.0+ | |
- BlackBerry 10 | |
- Ripple Emulator |
Parameters | |
---|---|
callback | function that is called with a FileWriter object. |
callback | function to execute when there is a failure. Invoked with a FileError object. |
void
file
(callback: function(), callback: function())
Return a File object that represents the current state of the file that this FileEntry represents.
Supported Platforms | |
---|---|
- BlackBerry PlayBook 1.0+ | |
- BlackBerry 10 | |
- Ripple Emulator |
Parameters | |
---|---|
callback | function that is called with a File object. |
callback | function to execute when there is an error during creating the File object. Invoked with a FileError object. (Function) |
void
getMetadata
(callback: function(), callback: function())
returns information (metadata) regarding to the fileEntry
Supported Platforms | |
---|---|
- BlackBerry PlayBook 1.0+ | |
- BlackBerry 10 | |
- Ripple Emulator |
Parameters | |
---|---|
callback | function that will execute when the event occurs successfully. |
callback | function that will execute when the event fails |
void
getParent
(callback: function(), callback: function())
returns the parent directoryEntry containing the specified fileEntry
Supported Platforms | |
---|---|
- BlackBerry PlayBook 1.0+ | |
- BlackBerry 10 | |
- Ripple Emulator |
Parameters | |
---|---|
callback | function to execute when it is successful |
callback | function to execute when there is a failure |
Code Example:
|
void
moveTo
(parent : DirectoryEntry, newName : String, callback: function(), callback: function())
moves a file to a different location on the file system
Supported Platforms | |
---|---|
- BlackBerry PlayBook 1.0+ | |
- BlackBerry 10 | |
- Ripple Emulator |
Parameters | |
---|---|
parent | directory to move the file to |
newName | The new name of the file. |
callback | function to execute when it is successful |
callback | function to execute when there is a failure |
Documentation generated by JsDoc Toolkit 2.4.0 on Sun Dec 30 2012 18:15:37 GMT-0500 (EST)