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}.
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}.
.toUri
[deprecated]
Deprecated. Use {@link #toUrl} instead.
Get the URI for this file.
opt_mimeType
{string
=}
- The MIME type that will be served for the URI.
- returns {
string
}
- The URI.
.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.
.wrapEntry(entry)
[protected]
Wrap an HTML5 entry object in an appropriate subclass instance.
entry
{!Entry
}
- The underlying Entry object.
- returns {!
goog.fs.Entry
}
- The appropriate subclass wrapper.