Provides information about files and allows JavaScript in a web page to access their content.

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

Hierarchy

  • Blob
    • File

Properties

lastModified: number
name: string
size: number
type: string
webkitRelativePath: string

Methods

  • Returns Promise<ArrayBuffer>

  • Parameters

    • Optional start: number
    • Optional end: number
    • Optional contentType: string

    Returns Blob

  • Returns ReadableStream<Uint8Array>

  • Returns Promise<string>