HTML and CSS Reference
In-Depth Information
Table B.37. FileEntry API
Constructor/attribute/
method
Description
Creates a new FileWriter associated with the file that FileEntry represents. If successful,
calls function success; otherwise calls function error.
createWriter(success, error)
Returns a file that represents the current state of the file that the FileEntry represents. If
successful, calls function success; otherwise calls function error.
file(success, error)
B.3.1. Directory-based APIs within the File System API
The File System API contains APIs to read directory entries in a directory. It also contains
APIs to create, read, look up, and recursively remove files in a directory. Directory entries
are objects that describe either a file or subdirectory. A directory entry contains attrib-
utes defining the entry's status as a file or subdirectory, the pathname to the entry, and the
filesystem containing the entry.
Table B.38 lists the methods for the directory entry object. This object represents a direct-
ory entry in a filesystem. It includes methods for creating, reading, looking up, and recurs-
ively removing files and subdirectories in a directory.
Table B.38. DirectoryEntry API
Constructor/attribute/method
Description
createReader()
Creates a new DirectoryReader object to read the directory.
Creates or looks up a directory depending on set options. Successful creation or
location is handled by the success callback; any errors will cause the error call-
back to be executed.
getDirectory(path,[options],[success],
[error])
Creates or looks up a file depending on set options. Successful creation or loca-
tion is handled by the success callback; any errors will cause the error callback to
be executed.
getFile(path, [options], [success], [er-
ror])
Deletes a directory and all contents; may only partially delete a directory if an er-
ror occurs. Successful creation or location is handled by the success callback; any
errors will cause the error callback to be executed.
removeRecursively(success, [error])
Table B.39 lists the only method for the DirectoryReader object.
 
 
Search WWH ::




Custom Search