Represents FsClient implementation which uses IndexedDB API under the hood for persistent storage. Meant to be used in a browser environment.

Limitations

  • Symlinks are not supported
  • No support for any statistics returned by stat or lstat methods
  • No support for empty directories creation, essentially it behaves very similar to Git which does not store empty directories

Hierarchy

  • IndexedDbFsClient

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>

  • Symlinks are not supported in the current implementation.

    Throws

    Error: symlinks are not supported.

    Parameters

    • target: string
    • path: string

    Returns Promise<void>

  • 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

    Returns Promise<void>

Generated using TypeDoc