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.
[Experimental]
The arrayBuffer() method of the web.files.Blob
interface is
to read the contents of a Blob as binary data. It returns a promise
resolves with an js.ArrayBuffer
.
blob.arrayBuffer().then(function (buffer) { // do something with buffer });
See also: https://developer.mozilla.org/en-US/docs/Web/API/Blob/arrayBuffer
Method. [Experimental] The arrayBuffer() method of the `web.files.Blob` interface is to read the contents of a Blob as binary data. It returns a promise resolves with an `js.ArrayBuffer`. `blob.arrayBuffer().then(function (buffer) { // do something with buffer });` See also: `https://developer.mozilla.org/en-US/docs/Web/API/Blob/arrayBuffer`
(file-name this)
Property.
[Non Standard] [Obsolute]
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. [Non Standard] [Obsolute] 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.
[Deprecated] [Non Standard]
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. [Deprecated] [Non Standard] 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.
[Non Standard] [Obsolute]
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. [Non Standard] [Obsolute] 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.
[Deprecated] [Non Standard]
The getAsDataURL provides a data:
URL that encodes the entire
of the referenced file.
var url = instanceOfFile.getAsDataURL();
See also: https://developer.mozilla.org/en-US/docs/Web/API/File/getAsDataURL
Method. [Deprecated] [Non Standard] The getAsDataURL provides a `data:` URL that encodes the entire 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.
[Non Standard] [Obsolute]
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. [Non Standard] [Obsolute] 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.
[Read Only]
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. [Read Only] 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.
[Read Only] [Deprecated]
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. [Read Only] [Deprecated] 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.
[Non Standard] [Draft]
A privileged exension to the web.files.File
interface, the
property contains the full pathname of the represented file.
See also: https://developer.mozilla.org/en-US/docs/Web/API/File/mozFullPath
Property. [Non Standard] [Draft] A privileged exension to the `web.files.File` interface, the property contains the full pathname of the represented file. See also: `https://developer.mozilla.org/en-US/docs/Web/API/File/mozFullPath`
(name this)
Property.
[Read Only]
Returns the name of the file represented by a web.files.File
For 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. [Read Only] Returns the name of the file represented by a `web.files.File` For 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.
[Non Standard] [Obsolute]
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. [Non Standard] [Obsolute] 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.
[Deprecated] [Non Standard]
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. [Deprecated] [Non Standard] 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-moz-full-path! this val)
Property.
[Non Standard] [Draft]
A privileged exension to the web.files.File
interface, the
property contains the full pathname of the represented file.
See also: https://developer.mozilla.org/en-US/docs/Web/API/File/mozFullPath
Property. [Non Standard] [Draft] A privileged exension to the `web.files.File` interface, the property contains the full pathname of the represented file. See also: `https://developer.mozilla.org/en-US/docs/Web/API/File/mozFullPath`
(size this)
Property.
[Read Only]
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. [Read Only] 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.files.Blob
containing the data in the specified range of bytes of the source
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.files.Blob` containing the data in the specified range of bytes of the source `var blob = instanceOfBlob.slice([start [, end [, contentType]]]);` See also: `https://developer.mozilla.org/en-US/docs/Web/API/Blob/slice`
(stream this)
Method.
[Experimental]
The stream() method of the web.files.Blob
interface transforms
Blob into a web.files.ReadableStream
of its data.
var stream = blob.stream();
See also: https://developer.mozilla.org/en-US/docs/Web/API/Blob/stream
Method. [Experimental] The stream() method of the `web.files.Blob` interface transforms Blob into a `web.files.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.
[Experimental]
blob.text().then(function (text) { // do something with the text });
See also: https://developer.mozilla.org/en-US/docs/Web/API/Blob/text
Method. [Experimental] `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.
[Read Only]
Returns the media type (MIME) of the file represented by a web.files.File
var name = file.type;
See also: https://developer.mozilla.org/en-US/docs/Web/API/File/type
Property. [Read Only] Returns the media type (MIME) of the file represented by a `web.files.File` `var name = file.type;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/File/type`
(webkit-relative-path this)
Property.
[Read Only] [Non Standard]
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 <input>
element with its webkitdirectory
set.
relativePath = File.webkitRelativePath
See also: https://developer.mozilla.org/en-US/docs/Web/API/File/webkitRelativePath
Property. [Read Only] [Non Standard] 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 `<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