Represents FsClient implementation which keeps all data in memory. Could be useful for testing when data persistence is not required. Meant to be used in Node.js and browser environments.

Hierarchy

  • InMemoryFsClient

Implements

Constructors

Methods

  • Return true if a entry exists, false if it doesn't exist. Rethrows errors that aren't related to entry existance.

    Parameters

    • path: string

    Returns Promise<boolean>

  • Returns information about the given file or directory.

    Remarks

    The method is similar to the stat method except it doesn't follow symlinks. When given a path that is a symlink it returns the stat of the symlink and not its target.

    Throws

    ENOENT

    Parameters

    • path: string

    Returns Promise<StatsLike>

  • Asynchronously writes data to a file, replacing the file if it already exists.

    Remarks

    Data can be a string or an Uint8Array. The encoding option is ignored if data is an Uint8Array.

    Throws

    ENOENT

    Parameters

    • path: string
    • data: string | Uint8Array
    • options: WriteOptions = {}

    Returns Promise<void>

Generated using TypeDoc