The goog.testing.fs.File Class

goog.testing.fs.File
> goog.testing.fs.Blob

goog.testing.fs.File(name, opt_lastModified, opt_data, opt_type)

A mock file object.

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.

.lastModifiedDate {Date}

@see
http://www.w3.org/TR/FileAPI/#dfn-lastModifiedDate

.name {string}

@see
http://www.w3.org/TR/FileAPI/#dfn-name

.setDataInternal(data)

Inherited from goog.testing.fs.Blob .

Sets the internal contents of the blob. This should only be called by other functions inside the {@code goog.testing.fs} namespace.

data {string}
The data for this Blob.

.size {number}

Inherited from goog.testing.fs.Blob .

@see
http://www.w3.org/TR/FileAPI/#dfn-size

.slice(start, length, opt_contentType)

Inherited from goog.testing.fs.Blob .

start {number}
The start byte offset.
length {number}
The number of bytes to slice.
opt_contentType {string=}
The type of the resulting Blob.
returns {!goog.testing.fs.Blob}
The result of the slice operation.
@see
http://www.w3.org/TR/FileAPI/#dfn-slice

.toArrayBuffer()

Inherited from goog.testing.fs.Blob .

returns {ArrayBuffer}
The string data encapsulated by the blob as an ArrayBuffer.

.toDataUrl()

Inherited from goog.testing.fs.Blob .

returns {string}
The string data encapsulated by the blob as a data: URI.

.toString()

Inherited from goog.testing.fs.Blob .

returns {string}
The string data encapsulated by the blob.