Class that provides an in-memory file storage system. It extends the BaseFileStore class and implements its readFile and writeFile methods. This class is typically used in scenarios where temporary, in-memory file storage is needed, such as during testing or for caching files in memory for quick access.

Hierarchy

  • BaseFileStore
    • InMemoryFileStore

Constructors

  • Parameters

    • Optional kwargs: SerializedFields
    • Rest ..._args: never[]

    Returns InMemoryFileStore

Methods

  • Retrieves the contents of a file given its path. If the file does not exist, it throws an error.

    Parameters

    • path: string

      The path of the file to read.

    Returns Promise<string>

    The contents of the file as a string.

  • Returns Serialized

  • Writes contents to a file at a given path. If the file already exists, it overwrites the existing contents.

    Parameters

    • path: string

      The path of the file to write.

    • contents: string

      The contents to write to the file.

    Returns Promise<void>

    Void

Generated using TypeDoc