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/DirectoryEntrySyncapis/filesystem/DirectoryEntrySync
Syntax
var = DirectoryEntrySync.getDirectory(path, options);
Parameters
path
- Data-type
- String
Either an absolute path or a relative path from this DirectoryEntrySync 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 DirectoryEntrySync corresponding to path.
Return Value
Returns an object of type
DirectoryEntrySync
Related specifications
- W3C File API: Directories and System Specification
- W3C Working Draft