Module Types.File

The **`File`** interface provides information about files and allows JavaScript in a web page to access their content.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/File)

type t = t_file

The **`lastModified`** read-only property of the File interface provides the last modified date of the file as the number of milliseconds since the Unix epoch (January 1, 1970 at midnight).

[MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified)

val last_modified : t -> float

The **`name`** read-only property of the File interface returns the name of the file represented by a File object.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name)

The **`lastModified`** read-only property of the File interface provides the last modified date of the file as the number of milliseconds since the Unix epoch (January 1, 1970 at midnight).

[MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified)

val name : t -> string

The **`webkitRelativePath`** read-only property of the File interface contains a string which specifies the file's path relative to the directory selected by the user in an input element with its `webkitdirectory` attribute set.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/File/webkitRelativePath)

The **`name`** read-only property of the File interface returns the name of the file represented by a File object.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name)

val webkit_relative_path : t -> string

The **`size`** read-only property of the Blob interface returns the size of the Blob or File in bytes.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/size)

The **`webkitRelativePath`** read-only property of the File interface contains a string which specifies the file's path relative to the directory selected by the user in an input element with its `webkitdirectory` attribute set.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/File/webkitRelativePath)

val size : t -> float

The **`type`** read-only property of the Blob interface returns the MIME type of the file.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/type)

The **`size`** read-only property of the Blob interface returns the size of the Blob or File in bytes.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/size)

val type_ : t -> string

The **`type`** read-only property of the Blob interface returns the MIME type of the file.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/type)

val array_buffer : t -> unit -> t_array_buffer Js.Promise.t
val bytes : t -> unit -> t_uint8_array Js.Promise.t
val slice : t -> ?start:float -> ?end_:float -> ?content_type:string -> unit -> t_blob
val stream : t -> unit -> t_readable_stream
val text : t -> unit -> string Js.Promise.t