Skip to content

Variable: nodeFileSystem

Documentation / @wtf/platform-fs-node / handles / nodeFileSystem

const nodeFileSystem: Readonly<{
constants: typeof constants;
openAsBlob: (path, options?) => Promise<Blob>;
sync: __module;
access: Promise<void>;
appendFile: Promise<void>;
chmod: Promise<void>;
chown: Promise<void>;
copyFile: Promise<void>;
cp: Promise<void>;
glob: AsyncIterator<string>;
lchmod: Promise<void>;
lchown: Promise<void>;
link: Promise<void>;
lstat: Promise<Stats>;
lutimes: Promise<void>;
mkdir: Promise<string | undefined>;
mkdtemp: Promise<string>;
mkdtempDisposable: Promise<DisposableTempDir>;
open: Promise<FileHandle>;
opendir: Promise<Dir>;
readdir: Promise<string[]>;
readFile: Promise<BufferView<T>>;
readlink: Promise<string>;
realpath: Promise<string>;
rename: Promise<void>;
rm: Promise<void>;
rmdir: Promise<void>;
stat: Promise<Stats>;
statfs: Promise<StatsFs>;
symlink: Promise<void>;
truncate: Promise<void>;
unlink: Promise<void>;
utimes: Promise<void>;
watch: AsyncIterator<FileChangeInfo<string>>;
writeFile: Promise<void>;
}>;

Defined in: packages/platform-fs-node/src/handles.ts:28

Node’s file system: its fs/promises; openAsBlob, of which a snapshot is a File; and the synchronous calls of node:fs, of which a file is read and written synchronously. A class that extends the adapter’s handles makes its root of it, by root(nodeFileSystem, path).