Interface SdkFile

Represents a file in the SDK.

Use MwFile instead.

interface SdkFile {
    data: string;
    lastModified: number;
    name: string;
    size: number;
    type: string;
    webkitRelativePath: string;
    arrayBuffer(): Promise<ArrayBuffer>;
    slice(start?: number, end?: number, type?: string): SdkFile;
    text(): Promise<string>;
}

Properties

data: string

The file's data.

lastModified: number

The last modified timestamp of the file.

name: string

The name of the file.

size: number

The size of the file in bytes.

type: string

The type of the file.

webkitRelativePath: string

The webkitRelativePath of the file.

Methods

  • Returns a promise that resolves to the file's data as an ArrayBuffer.

    Returns Promise<ArrayBuffer>

    A promise that resolves to the file's data as an ArrayBuffer.

  • Returns a new SdkFile object that represents a portion of the original file.

    Parameters

    • Optionalstart: number

      The starting position of the slice (optional).

    • Optionalend: number

      The ending position of the slice (optional).

    • Optionaltype: string

      The type of the slice (optional).

    Returns SdkFile

    A new SdkFile object that represents a portion of the original file.

  • Returns a promise that resolves to the file's data as a string.

    Returns Promise<string>

    A promise that resolves to the file's data as a string.