Class Directory

A directory that can be mounted inside a WASIX instance.

Constructors

Methods

  • Returns string

  • Create a directory.

    Parameters

    • path: string

    Returns Promise<void>

  • Returns void

  • Read the contents of a directory.

    Parameters

    • path: string

    Returns Promise<DirEntry[]>

  • Read the contents of a file from this directory.

    Note that the path is relative to the directory's root.

    Parameters

    • path: string

    Returns Promise<Uint8Array>

  • Read the contents of a file from this directory as a UTF-8 string.

    Note that the path is relative to the directory's root.

    Parameters

    • path: string

    Returns Promise<string>

  • Remove a directory.

    Parameters

    • path: string

    Returns Promise<void>

  • Remove a file.

    Parameters

    • path: string

    Returns Promise<void>

  • Write to a file.

    If a string is provided, it is encoded as UTF-8.

    Parameters

    • path: string
    • contents: string | Uint8Array

    Returns Promise<void>

Generated using TypeDoc