The File interface provides information about files and allows in a web page to access their content.
The File interface provides information about files and allows in a web page to access their content.
(array-buffer this & args)
Method.
The arrayBuffer() method of the web.Blob
interface is used
read the contents of a Blob as binary data. It returns a promise
resolves with an web.ArrayBuffer
.
blob.arrayBuffer().then(function (buffer) { // do something with buffer });
See also: https://developer.mozilla.org/en-US/docs/Web/API/Blob/arrayBuffer
Method. The arrayBuffer() method of the `web.Blob` interface is used read the contents of a Blob as binary data. It returns a promise resolves with an `web.ArrayBuffer`. `blob.arrayBuffer().then(function (buffer) { // do something with buffer });` See also: `https://developer.mozilla.org/en-US/docs/Web/API/Blob/arrayBuffer`
Constructor.
The File() constructor creates a new file.File
object instance.
bits
An web.Array
of web.ArrayBuffer
, web.ArrayBufferView
, web.Blob
, or dom.DOMString
objects — or a mix of any such objects. This is the file content encoded as UTF-8.
name
A web.USVString
representing the file name or the path to the file.
options Optional
An options object containing optional attributes for the file. Available options are as follows:
type: A dom.DOMString
representing the MIME type of the content that will be put into the file. Defaults to a value of "".
lastModified: A number representing the number of milliseconds between the Unix time epoch and when the file was last modified. Defaults to a value of web.Date.now()
.
See also: https://developer.mozilla.org/en-US/docs/Web/API/File/File
Constructor. The File() constructor creates a new `file.File` object instance. bits An `web.Array` of `web.ArrayBuffer`, `web.ArrayBufferView`, `web.Blob`, or `dom.DOMString` objects — or a mix of any such objects. This is the file content encoded as UTF-8. name A `web.USVString` representing the file name or the path to the file. options Optional An options object containing optional attributes for the file. Available options are as follows: type: A `dom.DOMString` representing the MIME type of the content that will be put into the file. Defaults to a value of \"\". lastModified: A number representing the number of milliseconds between the Unix time epoch and when the file was last modified. Defaults to a value of `web.Date.now()`. See also: `https://developer.mozilla.org/en-US/docs/Web/API/File/File`
(file-name this)
Property.
Returns the name of the file. For security reasons the path is from this property.
var name = instanceOfFile.fileName;
See also: https://developer.mozilla.org/en-US/docs/Web/API/File/fileName
Property. Returns the name of the file. For security reasons the path is from this property. `var name = instanceOfFile.fileName;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/File/fileName`
(file-size this)
Property.
Returns the size of a file in bytes.
var size = instanceOfFile.fileSize;
See also: https://developer.mozilla.org/en-US/docs/Web/API/File/fileSize
Property. Returns the size of a file in bytes. `var size = instanceOfFile.fileSize;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/File/fileSize`
(get-as-binary this)
Method.
The getAsBinary method allows to access the file's data in raw format.
var binary = instanceOfFile.getAsBinary();
See also: https://developer.mozilla.org/en-US/docs/Web/API/File/getAsBinary
Method. The getAsBinary method allows to access the file's data in raw format. `var binary = instanceOfFile.getAsBinary();` See also: `https://developer.mozilla.org/en-US/docs/Web/API/File/getAsBinary`
(get-as-data-url this)
Method.
The getAsDataURL provides a web.data:
URL that encodes the
contents of the referenced file.
var url = instanceOfFile.getAsDataURL();
See also: https://developer.mozilla.org/en-US/docs/Web/API/File/getAsDataURL
Method. The getAsDataURL provides a `web.data:` URL that encodes the contents of the referenced file. `var url = instanceOfFile.getAsDataURL();` See also: `https://developer.mozilla.org/en-US/docs/Web/API/File/getAsDataURL`
(get-as-text this encoding)
Method.
The getAsText method provides the file's data interpreted as using a given encoding.
var str = instanceOfFile.getAsText(encoding);
See also: https://developer.mozilla.org/en-US/docs/Web/API/File/getAsText
Method. The getAsText method provides the file's data interpreted as using a given encoding. `var str = instanceOfFile.getAsText(encoding);` See also: `https://developer.mozilla.org/en-US/docs/Web/API/File/getAsText`
(last-modified this)
Property.
The File.lastModified read-only property provides the last modified of the file as the number of milliseconds since the Unix epoch 1, 1970 at midnight). Files without a known last modified date the current date.
const time = instanceOfFile.lastModified;
See also: https://developer.mozilla.org/en-US/docs/Web/API/File/lastModified
Property. The File.lastModified read-only property provides the last modified of the file as the number of milliseconds since the Unix epoch 1, 1970 at midnight). Files without a known last modified date the current date. `const time = instanceOfFile.lastModified;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/File/lastModified`
(last-modified-date this)
Property.
The File.lastModifiedDate read-only property returns the last date of the file. Files without a known last modified date returns current date .
var time = instanceOfFile.lastModifiedDate
See also: https://developer.mozilla.org/en-US/docs/Web/API/File/lastModifiedDate
Property. The File.lastModifiedDate read-only property returns the last date of the file. Files without a known last modified date returns current date . `var time = instanceOfFile.lastModifiedDate` See also: `https://developer.mozilla.org/en-US/docs/Web/API/File/lastModifiedDate`
(moz-full-path this)
Property.
A privileged exension to the file.File
interface, the mozFullPath
contains the full pathname of the represented file.
See also: https://developer.mozilla.org/en-US/docs/Web/API/File/mozFullPath
Property. A privileged exension to the `file.File` interface, the mozFullPath contains the full pathname of the represented file. See also: `https://developer.mozilla.org/en-US/docs/Web/API/File/mozFullPath`
(name this)
Property.
Returns the name of the file represented by a file.File
object.
security reasons, the path is excluded from this property.
var name = file.name;
See also: https://developer.mozilla.org/en-US/docs/Web/API/File/name
Property. Returns the name of the file represented by a `file.File` object. security reasons, the path is excluded from this property. `var name = file.name;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/File/name`
(set-file-name! this val)
Property.
Returns the name of the file. For security reasons the path is from this property.
var name = instanceOfFile.fileName;
See also: https://developer.mozilla.org/en-US/docs/Web/API/File/fileName
Property. Returns the name of the file. For security reasons the path is from this property. `var name = instanceOfFile.fileName;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/File/fileName`
(set-file-size! this val)
Property.
Returns the size of a file in bytes.
var size = instanceOfFile.fileSize;
See also: https://developer.mozilla.org/en-US/docs/Web/API/File/fileSize
Property. Returns the size of a file in bytes. `var size = instanceOfFile.fileSize;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/File/fileSize`
(set-last-modified! this val)
Property.
The File.lastModified read-only property provides the last modified of the file as the number of milliseconds since the Unix epoch 1, 1970 at midnight). Files without a known last modified date the current date.
const time = instanceOfFile.lastModified;
See also: https://developer.mozilla.org/en-US/docs/Web/API/File/lastModified
Property. The File.lastModified read-only property provides the last modified of the file as the number of milliseconds since the Unix epoch 1, 1970 at midnight). Files without a known last modified date the current date. `const time = instanceOfFile.lastModified;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/File/lastModified`
(set-moz-full-path! this val)
Property.
A privileged exension to the file.File
interface, the mozFullPath
contains the full pathname of the represented file.
See also: https://developer.mozilla.org/en-US/docs/Web/API/File/mozFullPath
Property. A privileged exension to the `file.File` interface, the mozFullPath contains the full pathname of the represented file. See also: `https://developer.mozilla.org/en-US/docs/Web/API/File/mozFullPath`
(set-name! this val)
Property.
Returns the name of the file represented by a file.File
object.
security reasons, the path is excluded from this property.
var name = file.name;
See also: https://developer.mozilla.org/en-US/docs/Web/API/File/name
Property. Returns the name of the file represented by a `file.File` object. security reasons, the path is excluded from this property. `var name = file.name;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/File/name`
(set-size! this val)
Property.
Returns the size of a file in bytes.
var size = instanceOfFile.size
See also: https://developer.mozilla.org/en-US/docs/Web/API/File/size
Property. Returns the size of a file in bytes. `var size = instanceOfFile.size` See also: `https://developer.mozilla.org/en-US/docs/Web/API/File/size`
(set-type! this val)
Property.
Returns the media type (MIME) of the file represented by a file.File
var name = file.type;
See also: https://developer.mozilla.org/en-US/docs/Web/API/File/type
Property. Returns the media type (MIME) of the file represented by a `file.File` `var name = file.type;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/File/type`
(size this)
Property.
Returns the size of a file in bytes.
var size = instanceOfFile.size
See also: https://developer.mozilla.org/en-US/docs/Web/API/File/size
Property. Returns the size of a file in bytes. `var size = instanceOfFile.size` See also: `https://developer.mozilla.org/en-US/docs/Web/API/File/size`
(slice this & args)
Method.
The Blob.slice() method is used to create a new web.Blob
object
the data in the specified range of bytes of the source web.Blob
.
var blob = instanceOfBlob.slice([start [, end [, contentType]]]);
See also: https://developer.mozilla.org/en-US/docs/Web/API/Blob/slice
Method. The Blob.slice() method is used to create a new `web.Blob` object the data in the specified range of bytes of the source `web.Blob`. `var blob = instanceOfBlob.slice([start [, end [, contentType]]]);` See also: `https://developer.mozilla.org/en-US/docs/Web/API/Blob/slice`
(stream this)
Method.
The stream() method of the web.Blob
interface transforms a
into a web.ReadableStream
of its data.
var stream = blob.stream();
See also: https://developer.mozilla.org/en-US/docs/Web/API/Blob/stream
Method. The stream() method of the `web.Blob` interface transforms a into a `web.ReadableStream` of its data. `var stream = blob.stream();` See also: `https://developer.mozilla.org/en-US/docs/Web/API/Blob/stream`
(text this & args)
Method.
blob.text().then(function (text) { // do something with the text });
See also: https://developer.mozilla.org/en-US/docs/Web/API/Blob/text
Method. `blob.text().then(function (text) { // do something with the text });` See also: `https://developer.mozilla.org/en-US/docs/Web/API/Blob/text`
(type this)
Property.
Returns the media type (MIME) of the file represented by a file.File
var name = file.type;
See also: https://developer.mozilla.org/en-US/docs/Web/API/File/type
Property. Returns the media type (MIME) of the file represented by a `file.File` `var name = file.type;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/File/type`
(webkit-relative-path this)
Property.
The File.webkitRelativePath is a read-only property that contains
web.USVString
which specifies the file's path relative to the
selected by the user in an web.<input>
element with its webkitdirectory
set.
relativePath = File.webkitRelativePath
See also: https://developer.mozilla.org/en-US/docs/Web/API/File/webkitRelativePath
Property. The File.webkitRelativePath is a read-only property that contains `web.USVString` which specifies the file's path relative to the selected by the user in an `web.<input>` element with its webkitdirectory set. `relativePath = File.webkitRelativePath` See also: `https://developer.mozilla.org/en-US/docs/Web/API/File/webkitRelativePath`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close