The goog.fs.Entry Class

goog.fs.Entry(fs, entry)

The abstract class for entries in the filesystem.

fs {!goog.fs.FileSystem}
The wrapped filesystem.
entry {!Entry}
The underlying Entry object.

.copyTo(parent, opt_newName)

Copy this entry to a new location.

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 {@link goog.fs.FileEntry} or {@link goog.fs.DirectoryEntry} for the new entry. If an error occurs, the errback is called with a {@link goog.fs.Error}.

.getFileSystem()

returns {!goog.fs.FileSystem}
The filesystem backing this entry.

.getFullPath()

returns {string}
The full path to this entry.

.getLastModified()

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 {@link goog.fs.Error}.

.getMetadata()

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 {@link goog.fs.Error}.

.getName()

returns {string}
The name of this entry.

.getParent()

Gets the parent directory.

returns {!goog.async.Deferred}
The deferred {@link goog.fs.DirectoryEntry}. If an error occurs, the errback is called with a {@link goog.fs.Error}.

.isDirectory()

returns {boolean}
Whether or not this entry is a directory.

.isFile()

returns {boolean}
Whether or not this entry is a file.

.moveTo(parent, opt_newName)

Move this entry to a new location.

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 {@link goog.fs.FileEntry} or {@link goog.fs.DirectoryEntry} for the new entry. If an error occurs, the errback is called with a {@link goog.fs.Error}.

.remove()

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 {@link goog.fs.Error}.

.toUrl(opt_mimeType)

Get the URL for this file.

opt_mimeType {string=}
The MIME type that will be served for the URL.
returns {string}
The URL.