Liking cljdoc? Tell your friends :D

web.files.File

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.
raw docstring

constructorcljs

Constructor.

The File() constructor creates a new web.files.File object instance.

bits An js.Array of js.ArrayBuffer, web.typed.ArrayBufferView, web.files.Blob, or web.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 web.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 Date.now().

See also: https://developer.mozilla.org/en-US/docs/Web/API/File/File

Constructor.

The File() constructor creates a new `web.files.File` object instance.

bits
An `js.Array` of `js.ArrayBuffer`, `web.typed.ArrayBufferView`, `web.files.Blob`, or `web.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 `web.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 `Date.now()`.

See also: `https://developer.mozilla.org/en-US/docs/Web/API/File/File`
sourceraw docstring

file-namecljs

(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`
sourceraw docstring

file-sizecljs

(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`
sourceraw docstring

get-as-binarycljs

(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`
sourceraw docstring

get-as-data-urlcljs

(get-as-data-url this)

Method.

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.

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`
sourceraw docstring

get-as-textcljs

(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`
sourceraw docstring

last-modifiedcljs

(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`
sourceraw docstring

last-modified-datecljs

(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`
sourceraw docstring

moz-full-pathcljs

(moz-full-path this)

Property.

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.

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`
sourceraw docstring

namecljs

(name this)

Property.

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.

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`
sourceraw docstring

set-file-name!cljs

(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`
sourceraw docstring

set-file-size!cljs

(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`
sourceraw docstring

set-last-modified!cljs

(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`
sourceraw docstring

set-moz-full-path!cljs

(set-moz-full-path! this val)

Property.

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.

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`
sourceraw docstring

set-name!cljs

(set-name! this val)

Property.

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.

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`
sourceraw docstring

set-size!cljs

(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`
sourceraw docstring

set-type!cljs

(set-type! this val)

Property.

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.

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`
sourceraw docstring

sizecljs

(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`
sourceraw docstring

slicecljs

(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`
sourceraw docstring

typecljs

(type this)

Property.

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.

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`
sourceraw docstring

webkit-relative-pathcljs

(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 <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 `<input>` element with its webkitdirectory
set.

`relativePath = File.webkitRelativePath`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/File/webkitRelativePath`
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close