getDirectory
Summary
Creates or looks up a directory.
Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
Method of apis/filesystem/DirectoryEntryapis/filesystem/DirectoryEntry
Syntax
DirectoryEntry.getDirectory(path, options, successCallback, errorCallback);
Parameters
path
- Data-type
- String
Either an absolute path or a relative path from this DirectoryEntry to the directory to be looked up or created. It is an error to attempt to create a directory whose immediate parent does not yet exist.
options
- Data-type
- String
(Optional)
- If create and exclusive are both true and the path already exists, getDirectory must fail.
- If create is true, the path doesn’t exist, and no other error occurs, getDirectory must create and return a corresponding DirectoryEntry.
- If create is not true and the path doesn’t exist, getDirectory must fail.
- If create is not true and the path exists, but is a file, getDirectory must fail.
- Otherwise, if no other error occurs, getDirectory must return a DirectoryEntry corresponding to path.
successCallback
- Data-type
- String
(Optional)
A callback that is called to return the DirectoryEntry selected or created.
errorCallback
- Data-type
- String
(Optional)
A callback that is called when errors happen.
Return Value
No return value
Related specifications
- W3C File API: Directories and System Specification
- W3C Working Draft