A datastore backed by the file system.

Keys need to be sanitized before use, as they are written to the file system as is.

Hierarchy

Constructors

Properties

createIfMissing: boolean
deleteManyConcurrency: number
errorIfExists: boolean
extension: string
getManyConcurrency: number
path: string
putManyConcurrency: number

Methods

  • Calculate the original key, given the file name.

    Parameters

    • file: string

    Returns Key

  • Calculate the directory and file name for a given key.

    Parameters

    Returns {
        dir: string;
        file: string;
    }

    • dir: string
    • file: string
  • Delete the record under the given key

    Parameters

    Returns Promise<void>

  • Check for the existence of the given key

    Parameters

    Returns Promise<boolean>