fs

Classes

goog.fs.DirectoryEntry
A directory in a local FileSystem.
goog.fs.DirectoryEntryImpl
A directory in a local FileSystem. This should not be instantiated directly. Instead, it should be accessed via goog.fs.FileSystem#getRoot or goog.fs.DirectoryEntry#getDirectoryEntry.
goog.fs.Entry
The interface for entries in the filesystem.
goog.fs.EntryImpl
Base class for concrete implementations of goog.fs.Entry.
goog.fs.Error
A filesystem error. Since the filesystem API is asynchronous, stack traces are less useful for identifying where errors come from, so this includes a large amount of metadata in the message.
goog.fs.FileEntry
A file in a local filesystem.
goog.fs.FileEntryImpl
A file in a local filesystem. This should not be instantiated directly. Instead, it should be accessed via goog.fs.DirectoryEntry#getFile.
goog.fs.FileReader
An object for monitoring the reading of files. This emits ProgressEvents of the types listed in goog.fs.FileReader.EventType.
goog.fs.FileSaver
An object for monitoring the saving of files. This emits ProgressEvents of the types listed in goog.fs.FileSaver.EventType. This should not be instantiated directly. Instead, its subclass goog.fs.FileWriter should be accessed via goog.fs.FileEntry#createWriter.
goog.fs.FileSystem
A local filesystem.
goog.fs.FileSystemImpl
A local filesystem. This shouldn't be instantiated directly. Instead, it should be accessed via goog.fs.getTemporary or goog.fs.getPersistent.
goog.fs.FileWriter
An object for monitoring the saving of files, as well as other fine-grained writing operations. This should not be instantiated directly. Instead, it should be accessed via goog.fs.FileEntry#createWriter.
goog.fs.ProgressEvent
A wrapper for the progress events emitted by the File APIs.

Public Protected Private

Enumerations

goog.fs.FileSystemType_ :
The two types of filesystem.
Constants:
PERSISTENT
No description.
TEMPORARY
No description.
Code »

Global Functions

goog.fs.blobToString(blobopt_encoding) !goog.async.Deferred
Use goog.fs.FileReader.readAsText instead. Converts a Blob or a File into a string. This should only be used when the blob is known to be small.
Arguments:
blob : !Blob
The blob to convert.
opt_encoding : string=
The name of the encoding to use.
Returns: !goog.async.Deferred  The deferred string. If an error occurrs, the errback is called with a goog.fs.Error.
code »
goog.fs.browserSupportsObjectUrls() boolean
Checks whether this browser supports Object Urls. If not, calls to createObjectUrl and revokeObjectUrl will result in an error.
Returns: boolean  True if this browser supports Object Urls.
code »
goog.fs.createObjectUrl(blob) string
Creates a blob URL for a blob object. Throws an error if the browser does not support Object Urls.
Arguments:
blob : !Blob
The object for which to create the URL.
Returns: string  The URL for the object.
code »
goog.fs.findUrlObject_() ?goog.fs.UrlObject_
Finds the object that has the createObjectURL and revokeObjectURL functions for this browser.
Returns: ?goog.fs.UrlObject_  The object for this browser or null if the browser does not support Object Urls.
code »
goog.fs.getBlob(var_args) !Blob
Concatenates one or more values together and converts them to a Blob.
Arguments:
var_args : ...(string | !Blob | !ArrayBuffer)
The values that will make up the resulting blob.
Returns: !Blob  The blob.
code »
goog.fs.getBlobWithProperties(partsopt_typeopt_endings) !Blob
Creates a blob with the given properties. See https://developer.mozilla.org/en-US/docs/Web/API/Blob for more details.
Arguments:
parts : Array.<string | !Blob>
The values that will make up the resulting blob.
opt_type : string=
The MIME type of the Blob.
opt_endings : string=
Specifies how strings containing newlines are to be written out.
Returns: !Blob  The blob.
code »
goog.fs.getPersistent(size) !goog.async.Deferred
Returns a persistent FileSystem object. A persistent filesystem will never be deleted without the user's or application's authorization.
Arguments:
size : number
The size requested for the filesystem, in bytes.
Returns: !goog.async.Deferred  The deferred goog.fs.FileSystem. If an error occurs, the errback is called with a goog.fs.Error.
code »
goog.fs.getTemporary(size) !goog.async.Deferred
Returns a temporary FileSystem object. A temporary filesystem may be deleted by the user agent at its discretion.
Arguments:
size : number
The size requested for the filesystem, in bytes.
Returns: !goog.async.Deferred  The deferred goog.fs.FileSystem. If an error occurs, the errback is called with a goog.fs.Error.
code »
goog.fs.getUrlObject_() goog.fs.UrlObject_
Get the object that has the createObjectURL and revokeObjectURL functions for this browser.
Returns: goog.fs.UrlObject_  The object for this browser.
code »
goog.fs.get_(typesize) !goog.async.Deferred
Get a wrapped FileSystem object.
Arguments:
type : goog.fs.FileSystemType_
The type of the filesystem to get.
size : number
The size requested for the filesystem, in bytes.
Returns: !goog.async.Deferred  The deferred goog.fs.FileSystem. If an error occurs, the errback is called with a goog.fs.Error.
code »
goog.fs.revokeObjectUrl(url)
Revokes a URL created by goog.fs.createObjectUrl. Throws an error if the browser does not support Object Urls.
Arguments:
url : string
The URL to revoke.
code »
goog.fs.sliceBlob(blobstartopt_end) Blob
Slices the blob. The returned blob contains data from the start byte (inclusive) till the end byte (exclusive). Negative indices can be used to count bytes from the end of the blob (-1 == blob.size - 1). Indices are always clamped to blob range. If end is omitted, all the data till the end of the blob is taken.
Arguments:
blob : !Blob
The blob to be sliced.
start : number
Index of the starting byte.
opt_end : number=
Index of the ending byte.
Returns: Blob  The blob slice or null if not supported.
code »

Global Properties

goog.fs.UrlObject_ :
No description.
Code »

Package fs

Package Reference