Class StoreFS<T>Internal

A file system which uses a key-value store.

We use a unique ID for each node in the file system. The root node has a fixed ID.

Introduce Node ID caching.

Check modes.

Type Parameters

Hierarchy (view full)

Constructors

Properties

_disableSync?: boolean

Whether the sync cache should be disabled. Only affects async things.

store: T

Methods

  • Helper function for findINode.

    Parameters

    Returns bigint

    string The ID of the file's inode in the file system.

  • Checks if the root directory exists. Creates it if it doesn't.

    Returns Promise<void>

  • Delete all contents stored in the file system.

    Returns Promise<void>

  • Finds the Inode of path.

    Parameters

    • tx: Transaction<Store>
    • path: string

      The path to look up.

    • syscall: string
    • visited: Set<string> = ...

    Returns Inode

    The Inode of the path p.

    memoize/cache

  • Updated the inode and data node at path

    Parameters

    • path: string
    • data: Uint8Array
    • stats: Readonly<Stats>

    Returns Promise<void>

    Ensure mtime updates properly, and use that to determine if a data update is required.

  • Updated the inode and data node at path

    Parameters

    • path: string
    • data: Uint8Array
    • stats: Readonly<Stats>

    Returns void

    Ensure mtime updates properly, and use that to determine if a data update is required.