bupkis
    Preparing search index...

    Interface File

    Do not reference this directly.

    interface File {
        type: string;
        size: number;
        lastModified: number;
        name: string;
        webkitRelativePath: string;
        arrayBuffer(): Promise<ArrayBuffer>;
        bytes(): Promise<Uint8Array<ArrayBuffer>>;
        slice(start?: number, end?: number, contentType?: string): Blob;
        stream(): ReadableStream<Uint8Array<ArrayBuffer>>;
        text(): Promise<string>;
    }

    Hierarchy

    Index

    Properties

    type: string

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

    MDN Reference

    size: number

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

    MDN Reference

    lastModified: number

    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

    name: string

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

    MDN Reference

    webkitRelativePath: 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

    Methods

    • The arrayBuffer() method of the Blob interface returns a Promise that resolves with the contents of the blob as binary data contained in an ArrayBuffer.

      MDN Reference

      Returns Promise<ArrayBuffer>

    • The slice() method of the Blob interface creates and returns a new Blob object which contains data from a subset of the blob on which it's called.

      MDN Reference

      Parameters

      • Optionalstart: number
      • Optionalend: number
      • OptionalcontentType: string

      Returns Blob

    • The text() method of the string containing the contents of the blob, interpreted as UTF-8.

      MDN Reference

      Returns Promise<string>