gossamer/file
Types
pub type FileOption {
Type(String)
LastModified(Int)
}
Constructors
-
Type(String) -
LastModified(Int)
Values
pub fn array_buffer(
of file: File,
) -> promise.Promise(Result(array_buffer.ArrayBuffer, String))
pub fn bytes(
of file: File,
) -> promise.Promise(Result(uint8_array.Uint8Array, String))
pub fn from_blob_with(
blob: blob.Blob,
named name: String,
with options: List(FileOption),
) -> File
pub fn from_strings(
parts: List(String),
named name: String,
) -> File
pub fn from_strings_with(
parts: List(String),
named name: String,
with options: List(FileOption),
) -> File
pub fn last_modified(of file: File) -> Int
pub fn slice_with_type(
file: File,
from start: Int,
to end: Int,
content_type content_type: String,
) -> blob.Blob
pub fn stream(
of file: File,
) -> readable_stream.ReadableStream(uint8_array.Uint8Array)
pub fn text(
of file: File,
) -> promise.Promise(Result(String, String))