The goog.fs.FileEntry Class

goog.fs.FileEntry
> goog.fs.Entry

goog.fs.FileEntry(fs, file)

A file in a local filesystem. This should not be instantiated directly. Instead, it should be accessed via {@link goog.fs.DirectoryEntry#getDirectoryEntry}.

fs {!goog.fs.FileSystem}
The wrapped filesystem.
file {!FileEntry}
The underlying FileEntry object.

.copyTo(parent, opt_newName)

Inherited from goog.fs.Entry .

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}.

.createWriter()

Create a writer for writing to the file.

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

.file()

Get the file contents as a File blob.

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

.getFileSystem()

Inherited from goog.fs.Entry .

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

.getFullPath()

Inherited from goog.fs.Entry .

returns {string}
The full path to this entry.

.getLastModified()

Inherited from goog.fs.Entry .

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()

Inherited from goog.fs.Entry .

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()

Inherited from goog.fs.Entry .

returns {string}
The name of this entry.

.getParent()

Inherited from goog.fs.Entry .

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()

Inherited from goog.fs.Entry .

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

.isFile()

Inherited from goog.fs.Entry .

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

.moveTo(parent, opt_newName)

Inherited from goog.fs.Entry .

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()

Inherited from goog.fs.Entry .

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)

Inherited from goog.fs.Entry .

Get the URL for this file.

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