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

    Class NativeVfsProvider

    Native ChRIS filesystem provider operating on absolute CUBE folders.

    Implements

    Index
    prefix: string = ""

    Prefix matches everything.

    • Copies files or folders from/to paths under this provider.

      Parameters

      • src: string

        The absolute source path.

      • dest: string

        The absolute destination path.

      • options: CpOptions

        Copy flags like recursive.

      Returns Promise<VfsOutcome>

      Done, or why not.

    • Lists native ChRIS folder contents (dirs, files, links).

      Parameters

      • pathStr: string

        Absolute directory path.

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

        Sorting parameters.

      Returns Promise<Result<VFSItem[]>>

    • Makes one folder; its parent must exist. Absent, the mount makes none.

      Parameters

      • target: string

        The absolute path of the new folder.

      Returns Promise<VfsOutcome>

      Done, or why not (EEXIST, ENOENT for a missing parent, ...).

    • Makes a folder and any missing parents in one step, for a mount whose store can (mkdir -p). Absent, mkdir -p makes each missing parent in turn.

      Parameters

      • target: string

        The absolute path of the folder.

      Returns Promise<VfsOutcome>

      Done, or why not (EEXIST when something is already there).

    • Reads a file whole, as text.

      Parameters

      • target: string

        The absolute path of the file.

      Returns Promise<VfsOutcome<string>>

      Its content, or why not (ENOENT, EISDIR, ...).

    • Reads a file whole, as bytes.

      Parameters

      • target: string

        The absolute path of the file.

      Returns Promise<VfsOutcome<Buffer<ArrayBufferLike>>>

      Its bytes, or why not.

    • Renames an entry within this mount (mv).

      Parameters

      • src: string

        The absolute path now.

      • dest: string

        The absolute path it takes.

      Returns Promise<VfsOutcome>

      Done, or why not (ENOENT, EEXIST where the mount cannot replace, ...).

    • Removes a file or a link (rm); a folder is refused with EISDIR.

      Parameters

      • target: string

        The absolute path of the entry.

      Returns Promise<VfsOutcome>

      Done, or why not.

    • Removes an empty folder (rmdir).

      Parameters

      • target: string

        The absolute path of the folder.

      Returns Promise<VfsOutcome>

      Done, or why not (ENOENT, ENOTDIR, ENOTEMPTY, ...).

    • Removes a folder and everything under it in one step, for a mount whose store can (rm -r). Absent, rm -r removes what it holds one entry at a time.

      Parameters

      • target: string

        The absolute path of the folder.

      Returns Promise<VfsOutcome>

      Done, or why not.

    • Writes a file whole: its content after the write is exactly what was given, whether or not it existed before. Absent, the mount holds no writable files.

      Parameters

      • target: string

        The absolute path of the file.

      • content: string | Buffer<ArrayBufferLike>

        The new content, whole.

      Returns Promise<VfsOutcome>

      Done, or why not (ENOENT for a missing folder, EISDIR, ...).