IFile class

IFile class

A File object is a Blob object with a name attribute, which is a string; it can be created within the web application via a constructor, or is a reference to a byte sequence from a file from the underlying (OS) file system.

The IFile type exposes the following members:

Properties

PropertyDescription
nameThe name of the file.
On getting, this must return the name of the file as a string.
last_modifiedThe last modified date of the file. On getting, if user agents can make this information available,
this must return a long long set to the time the file was last modified as the number of milliseconds since the Unix Epoch.
sizeReturns the size of the byte sequence in number of bytes.
On getting, conforming user agents must return the total number of bytes that can be read by a FileReader
or FileReaderSync object, or 0 if the Blob has no bytes to be read.
typeThe ASCII-encoded string in lower case representing the media type of the Blob.
On getting, user agents must return the type of a Blob as an ASCII-encoded string in lower case,
such that when it is converted to a byte sequence, it is a parsable MIME type,
or the empty string – 0 bytes – if the type cannot be determined.

Methods

MethodDescription
sliceReturns a new Blob object with bytes 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.

See Also