@deephaven/jsapi-types
    Preparing search index...

    Class FileContents

    Represents a file's contents loaded from the server. If an etag was specified when loading, client should first test if the etag of this instance matches - if so, the contents will be empty, and the client's existing contents should be used.

    Index
    • get etag(): string

      The etag associated with the contents.

      If an etag was provided when loading and the server indicates that the client's cached contents are still valid, the contents of this instance may be empty and only the etag will be returned.

      Returns string

    • Reads the contents as an ArrayBuffer.

      Returns Promise<ArrayBuffer>

      A promise that resolves to the file contents as an ArrayBuffer.

    • Reads the contents as text.

      Returns Promise<string>

      A promise that resolves to the file contents as a string.

    • Creates an instance from one or more ArrayBuffer values.

      Parameters

      • ...buffers: ArrayBuffer[]

        One or more buffers to combine into a Blob.

      Returns FileContents

      A FileContents instance containing the provided data.

    • Creates an instance from an existing Blob.

      Parameters

      • blob: Blob

        The blob containing the file contents.

      Returns FileContents

      A FileContents instance containing the provided data.

    • Creates an instance from text.

      Parameters

      • ...text: string[]

        One or more string parts to combine into a Blob.

      Returns FileContents

      A FileContents instance containing the provided data.