Supports some (asynchronous) file operations.

Constructors

Methods

  • A load file transaction.

    Selects a file with the file open dialog and reads and returns the file content.

    Parameters

    • fileInputId: string

    Returns Promise<string>

  • Reads a file.

    A File object must be given, provided by the FileReader object.

    Parameters

    • file: any

      the file object

    Returns Promise<string>

  • Lets You select a file where the given content is written to.

    The output is written by the system after the file selection is initiated.

    Parameters

    • content: string

      the content string

    • type: string

      a type string (MIME type)

    • fileAnchorId: string

      the id field of an anchor to be used by the operation

    Returns void

  • Selects a file from file open dialog.

    This works in tandem with the callback selectFileCb.

    Parameters

    • fileInputId: string

      the id of an input field serving for file open clicks.

    Returns Promise<unknown>