fs.DirectoryEntry Extends goog.fs.Entry
A directory in a local FileSystem.

Inheritance

Constructor

goog.fs.DirectoryEntry()

Instance Methods

Public Protected Private
createPath(path) !goog.async.Deferred
Opens the directory for the specified path, creating the directory and any intermediate directories as necessary.
Arguments:
path : string
The directory path to create. May be absolute or relative to the current directory. The parent directory ".." and current directory "." are supported.
Returns: !goog.async.Deferred  A deferred goog.fs.DirectoryEntry for the requested path. If an error occurs, the errback is called with a goog.fs.Error.
code »
getDirectory(pathopt_behavior) !goog.async.Deferred
Get a directory within this directory.
Arguments:
path : string
The path to the directory, relative to this directory.
opt_behavior : goog.fs.DirectoryEntry.Behavior=
The behavior for handling an existing directory, or the lack thereof.
Returns: !goog.async.Deferred  The deferred goog.fs.DirectoryEntry. If an error occurs, the errback is called a goog.fs.Error.
code »
getFile(pathopt_behavior) !goog.async.Deferred
Get a file in the directory.
Arguments:
path : string
The path to the file, relative to this directory.
opt_behavior : goog.fs.DirectoryEntry.Behavior=
The behavior for handling an existing file, or the lack thereof.
Returns: !goog.async.Deferred  The deferred goog.fs.FileEntry. If an error occurs, the errback is called with a goog.fs.Error.
code »
listDirectory() !goog.async.Deferred
Gets a list of all entries in this directory.
Returns: !goog.async.Deferred  The deferred list of goog.fs.Entry results. If an error occurs, the errback is called with a goog.fs.Error.
code »
removeRecursively() !goog.async.Deferred
Removes this directory and all its contents.
Returns: !goog.async.Deferred  A deferred object. If the removal succeeds, the callback is called with true. If an error occurs, the errback is called a goog.fs.Error.
code »
Defined in goog.fs.Entry
copyTo(parentopt_newName) !goog.async.Deferred
Copy this entry to a new location.
Arguments:
parent : !goog.fs.DirectoryEntry
The new parent directory.
opt_newName : string=
The name of the new entry. If omitted, the new entry has the same name as the original.
Returns: !goog.async.Deferred  The deferred goog.fs.FileEntry or goog.fs.DirectoryEntry for the new entry. If an error occurs, the errback is called with a goog.fs.Error.
code »
getFileSystem() !goog.fs.FileSystem
No description.
Returns: !goog.fs.FileSystem  The filesystem backing this entry.
code »
getFullPath() string
No description.
Returns: string  The full path to this entry.
code »
getLastModified() !goog.async.Deferred
Retrieves the last modified date for this entry.
Returns: !goog.async.Deferred  The deferred Date for this entry. If an error occurs, the errback is called with a goog.fs.Error.
code »
getMetadata() !goog.async.Deferred
Retrieves the metadata for this entry.
Returns: !goog.async.Deferred  The deferred Metadata for this entry. If an error occurs, the errback is called with a goog.fs.Error.
code »
getName() string
No description.
Returns: string  The name of this entry.
code »
getParent() !goog.async.Deferred
Gets the parent directory.
Returns: !goog.async.Deferred  The deferred goog.fs.DirectoryEntry. If an error occurs, the errback is called with a goog.fs.Error.
code »
isDirectory() boolean
No description.
Returns: boolean  Whether or not this entry is a directory.
code »
isFile() boolean
No description.
Returns: boolean  Whether or not this entry is a file.
code »
moveTo(parentopt_newName) !goog.async.Deferred
Move this entry to a new location.
Arguments:
parent : !goog.fs.DirectoryEntry
The new parent directory.
opt_newName : string=
The new name of the entry. If omitted, the entry retains its original name.
Returns: !goog.async.Deferred  The deferred goog.fs.FileEntry or goog.fs.DirectoryEntry for the new entry. If an error occurs, the errback is called with a goog.fs.Error.
code »
remove() !goog.async.Deferred
Remove this entry.
Returns: !goog.async.Deferred  A deferred object. If the removal succeeds, the callback is called with true. If an error occurs, the errback is called a goog.fs.Error.
code »
toUri(opt_mimeType) string
Use #toUrl instead. Get the URI for this file.
Arguments:
opt_mimeType : string=
The MIME type that will be served for the URI.
Returns: string  The URI.
code »
toUrl(opt_mimeType) string
Get the URL for this file.
Arguments:
opt_mimeType : string=
The MIME type that will be served for the URL.
Returns: string  The URL.
code »
wrapEntry(entry) !goog.fs.Entry
Wrap an HTML5 entry object in an appropriate subclass instance.
Arguments:
entry : !Entry
The underlying Entry object.
Returns: !goog.fs.Entry  The appropriate subclass wrapper.
code »

Enumerations

goog.fs.DirectoryEntry.Behavior :
Behaviors for getting files and directories.
Constants:
CREATE
No description.
CREATE_EXCLUSIVE
No description.
DEFAULT
No description.
Code »

Package fs

Package Reference