testing.fs.File Extends goog.testing.fs.Blob
A mock file object.

Inheritance

Constructor

goog.testing.fs.File(nameopt_lastModifiedopt_dataopt_type)

Parameters

name : string
The name of the file.
opt_lastModified : Date=
The last modified date for this file. May be null if file modification dates are not supported.
opt_data : string=
The string data encapsulated by the blob.
opt_type : string=
The mime type of the blob.

Instance Methods

Public Protected Private
setDataInternal(data)
Sets the internal contents of the blob. This should only be called by other functions inside the goog.testing.fs namespace.
Arguments:
data : string
The data for this Blob.
code »
slice(opt_startopt_endopt_contentType) !goog.testing.fs.Blob
Creates a blob with bytes of a blob ranging from the optional start parameter up to but not including the optional end parameter, and with a type attribute that is the value of the optional contentType parameter.
Arguments:
opt_start : number=
The start byte offset.
opt_end : number=
The end point of a slice.
opt_contentType : string=
The type of the resulting Blob.
Returns: !goog.testing.fs.Blob  The result blob of the slice operation.
code »
toArrayBuffer() !ArrayBuffer
No description.
Returns: !ArrayBuffer  The string data encapsulated by the blob as an ArrayBuffer.
code »
toDataUrl() string
No description.
Returns: string  The string data encapsulated by the blob as a data: URI.
code »
toString() string
No description.
Returns: string  The string data encapsulated by the blob.
code »

Instance Properties

constructor :
No description.
Code »
lastModifiedDate :
No description.
Code »
name :
No description.
Code »
data_ :
The string data encapsulated by the blob.
Code »
size :
No description.
Code »
type :
No description.
Code »

Static Properties

goog.testing.fs.File.superClass_ :
No description.
Code »

Package testing.fs

Package Reference