fs.js
No description.

File Location

/goog/testing/fs/fs.js


Public Protected Private

Global Functions

goog.testing.fs.blobToString(blobopt_encoding) !goog.async.Deferred
Returns the string value of a fake blob.
Arguments:
blob : !goog.testing.fs.Blob
The blob to convert to a string.
opt_encoding : string=
Ignored.
Returns: !goog.async.Deferred  The deferred string value of the blob.
code »
goog.testing.fs.createObjectUrl(blob) string
Create a fake object URL for a given fake blob. This can be used as a real URL, and it can be created and revoked normally.
Arguments:
blob : !goog.testing.fs.Blob
The blob for which to create the URL.
Returns: string  The URL.
code »
goog.testing.fs.getBlob(var_args) !goog.testing.fs.Blob
Concatenates one or more values together and converts them to a fake blob.
Arguments:
var_args : ...(string | !goog.testing.fs.Blob)
The values that will make up the resulting blob.
Returns: !goog.testing.fs.Blob  The blob.
code »
goog.testing.fs.getPersistent(size) !goog.async.Deferred
Get a filesystem object. Since these are mocks, there's no difference between temporary and persistent filesystems.
Arguments:
size : number
Ignored.
Returns: !goog.async.Deferred  The deferred goog.testing.fs.FileSystem.
code »
goog.testing.fs.getTemporary(size) !goog.async.Deferred
Get a filesystem object. Since these are mocks, there's no difference between temporary and persistent filesystems.
Arguments:
size : number
Ignored.
Returns: !goog.async.Deferred  The deferred goog.testing.fs.FileSystem.
code »
goog.testing.fs.install(stubs)
Installs goog.testing.fs in place of the standard goog.fs. After calling this, code that uses goog.fs should work without issue using goog.testing.fs.
Arguments:
stubs : !goog.testing.PropertyReplacer
The property replacer for stubbing out the original goog.fs functions.
code »
goog.testing.fs.isObjectUrlGranted(blob) boolean
Return whether or not a URL has been granted for the given blob.
Arguments:
blob : !goog.testing.fs.Blob
The blob to check.
Returns: boolean  Whether a URL has been granted.
code »
goog.testing.fs.revokeObjectUrl(url)
Remove a URL that was created for a fake blob.
Arguments:
url : string
The URL to revoke.
code »

Directory fs

File Reference