Module Brr.File
File objects and reads.
There are various ways to get t
values. On of them is to create an El.input
element of type file
and use the El.Input.files
function. Another way is to use drag and drop events and get them via the Ev.Data_transfer
values.
Files
val init : ?blob_init:Blob.init -> ?last_modified_ms:int -> unit -> init
init ()
is a file initialisation object with the given properties.
type t
The type for
File
objects.
val of_blob : ?init:init -> Jstr.t -> Blob.t -> t
of_blob name b
is a file namedname
with datab
.Note. Reading the constructor specificaton it seems this will not look into
b
to define theBlob.type'
of the resulting file object's blob. You should define it via theinit
object.
val last_modified_ms : t -> int
last_modified_ms f
is the last modified time in milliseconds since the POSIX epoch.