A TreeContainer useful for mocking a file system.

Hierarchy (view full)

Constructors

Methods

  • Searches for a metadata component file in a container directory.

    Parameters

    • fileType: "content" | "metadataXml"

      The type of component file

    • name: string

      The name of the file without a suffix

    • directory: string

      The directory to search in

    Returns undefined | string

    The first path that meets the criteria, or undefined if none were found

  • Creates a readable stream of a file's contents.

    Parameters

    • fsPath: string

      File path to create a readable stream from

    Returns Readable

    A readable stream

  • Designed for recreating virtual files from deleted files where the only information we have is the file's former location Any use of MetadataResolver was trying to access the non-existent files and throwing

    Parameters

    • paths: string[]

      full paths to files

    Returns VirtualTreeContainer

    VirtualTreeContainer