mise API - v0.0.0
    Preparing search index...

    Class CubeVfsDispatcher

    fond's dispatcher with the ChRIS backend's mounts registered, and CUBE's files as the fallback.

    Hierarchy (View Summary)

    Index
    pacs: PacsVfsProvider = ...

    The PACS mount, whose decoded answers other verbs read from its cache.

    • Says which item types are folders, beyond dir and vfs: the installed backend's listing look, through itemType_isContainer.

      Parameters

      • test: (type: string) => boolean

        True for a type that holds other items.

      Returns void

    • Copies within or between paths, through the provider that owns the source.

      Parameters

      • src: string

        Source path.

      • dest: string

        Destination path.

      • options: CpOptions

        Copy options.

      Returns Promise<VfsOutcome>

      Done, or why not.

    • Resolves a lazy link through the provider that owns it.

      This is deliberately distinct from list: a structural traversal can display an unresolved link without causing its provider to fetch the target from a remote service.

      Parameters

      • pathStr: string

        Absolute path of the provider-defined link.

      Returns Promise<Result<string>>

      The resolved target path, or an error if unsupported or absent.

    • Dispatches directory listing to matched provider. Supports dynamic intermediate parent path synthesis for virtual prefixes.

      Parameters

      • pathStr: string

        The absolute virtual path to list.

      • Optionaloptions: { reverse?: boolean; sort?: "name" | "size" | "date" | "owner" }

        Sort controls.

      Returns Promise<Result<VFSItem[]>>

      Promise resolving to Result<VFSItem[]>.

    • Makes a folder, through the provider that owns its path.

      Parameters

      • pathStr: string

        The absolute path of the new folder.

      Returns Promise<VfsOutcome>

      Done, or why not.

    • Makes a folder and any missing parents in one step, where the owning provider can; elsewhere EROFS, and mkdir -p walks instead.

      Parameters

      • pathStr: string

        The absolute path of the folder.

      Returns Promise<VfsOutcome>

      Done, or why not.

    • Whether the provider that owns a folder makes it and its parents in one step.

      Parameters

      • pathStr: string

        The absolute path of the folder.

      Returns boolean

      True when mkdirTree is offered there.

    • Whether a path belongs to a mount rather than to the fallback.

      Two shapes count: a path a mount owns (at or under its prefix), and a path that is a strict ancestor of a mount's prefix (/proc above /proc/jobs), whose only children are the mounts beneath it. The root / never counts: it is the fallback's own root.

      It keeps the fallback from being asked to answer for a path it has no folder behind, which cannot succeed and only fills the error stack once per ancestor a path walk visits.

      Parameters

      • pathStr: string

        The absolute (or root-relative) path to classify.

      Returns boolean

      True when a mount owns, or is owned by, the path.

    • Registers a path resolution hook that maps logical paths to physical paths.

      Parameters

      • resolver: (path: string) => Promise<string>

        The resolver function mapping a logical path to a physical path.

      Returns void

    • Resolves the matching provider for a given virtual path.

      Parameters

      • pathStr: string

        The absolute virtual path.

      Returns VFSProvider

      The matching mount, or the fallback.

    • Returns every registered mount (not the fallback). Used by callers that need to detect parent-of-prefix paths.

      Returns VFSProvider[]

    • Reads a file whole, as text, through the provider that owns it.

      Parameters

      • pathStr: string

        The absolute path of the file.

      Returns Promise<VfsOutcome<string>>

      Its content, or why not (EROFS where no read is offered).

    • Reads a file whole, as bytes, through the provider that owns it.

      Parameters

      • pathStr: string

        The absolute path of the file.

      Returns Promise<VfsOutcome<Buffer<ArrayBufferLike>>>

      Its bytes, or why not.

    • Renames within one mount; a rename across mounts answers EXDEV.

      Parameters

      • src: string

        The absolute path now.

      • dest: string

        The absolute path it takes.

      Returns Promise<VfsOutcome>

      Done, or why not.

    • Removes a file or a link, through the provider that owns it.

      Parameters

      • pathStr: string

        The absolute path of the entry.

      Returns Promise<VfsOutcome>

      Done, or why not.

    • Removes an empty folder, through the provider that owns it.

      Parameters

      • pathStr: string

        The absolute path of the folder.

      Returns Promise<VfsOutcome>

      Done, or why not.

    • Removes a folder and everything under it in one step, where the owning provider can; elsewhere EROFS, and rm -r walks instead.

      Parameters

      • pathStr: string

        The absolute path of the folder.

      Returns Promise<VfsOutcome>

      Done, or why not.

    • Whether the provider that owns a folder removes it whole in one step.

      Parameters

      • pathStr: string

        The absolute path of the folder.

      Returns boolean

      True when rmTree is offered there.

    • Asks the mount that owns a path to answer its whole subtree from what it holds (see VFSProvider.subtree).

      Parameters

      • pathStr: string

        The subtree's root.

      Returns Promise<VFSSubtree | null>

      The answer, or null when the mount cannot give one.

    • Writes a file whole, through the provider that owns it; a mount that holds no writable files answers EROFS.

      Parameters

      • pathStr: string

        The absolute path of the file.

      • content: string | Buffer<ArrayBufferLike>

        The new content, whole.

      Returns Promise<VfsOutcome>

      Done, or why not.