The path prefix this provider matches (e.g. '/net/pacs', '/bin'); empty for a fallback.
Copies files or folders from/to paths under this provider.
The absolute source path.
The absolute destination path.
Copy flags like recursive.
Done, or why not.
OptionallinkResolves the target of a provider-defined lazy link when an operation actually follows it.
Listings must not use this hook: providers may expose an unresolved link as structural metadata without paying for its target until navigation.
Absolute virtual path naming the link.
The target path, or an error when the provider cannot resolve it.
Lists the contents of a directory matching this provider.
The absolute virtual directory path.
Optionaloptions: { reverse?: boolean; sort?: "name" | "size" | "date" | "owner" }
Optional sorting controls.
A Promise resolving to a Result containing VFSItems.
OptionalmkdirMakes one folder; its parent must exist. Absent, the mount makes none.
The absolute path of the new folder.
Done, or why not (EEXIST, ENOENT for a missing parent, ...).
OptionalmkdirMakes 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.
The absolute path of the folder.
Done, or why not (EEXIST when something is already there).
OptionalreadReads a file whole, as text.
The absolute path of the file.
Its content, or why not (ENOENT, EISDIR, ...).
OptionalreadReads a file whole, as bytes.
The absolute path of the file.
Its bytes, or why not.
OptionalrenameRenames an entry within this mount (mv).
The absolute path now.
The absolute path it takes.
Done, or why not (ENOENT, EEXIST where the mount cannot replace, ...).
OptionalrmRemoves a file or a link (rm); a folder is refused with EISDIR.
The absolute path of the entry.
Done, or why not.
OptionalrmdirRemoves an empty folder (rmdir).
The absolute path of the folder.
Done, or why not (ENOENT, ENOTDIR, ENOTEMPTY, ...).
OptionalrmRemoves 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.
The absolute path of the folder.
Done, or why not.
OptionalsubtreeAnswers everything beneath a path at once, from what the mount already
holds, so a walk (find) need not list it folder by folder. Null when
the mount holds nothing it can answer from.
The subtree's root.
The entries in walk order and what is left to walk, or null.
OptionalwriteWrites 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.
The absolute path of the file.
The new content, whole.
Done, or why not (ENOENT for a missing folder, EISDIR, ...).
Base contract that every Virtual File System Provider must implement.