Skip to Content
APIOverview

API Overview

We are rewriting Node.js fs APIs one by one. This page gives an overview; the full list with argument and return types is in the README .

Legend

  • — Fully supported
  • 🚧 — Partially supported / WIP
  • — Extra option or behavior from Rush-FS (e.g. concurrency)
  • — Not supported yet

Supported APIs

APIStatusNotes
readdirwithFileTypes, recursive, concurrency
readFileencodings, flag
writeFileencodings, mode, flag
appendFile
copyFileCOPYFILE_EXCL
cprecursive, concurrency
mkdirrecursive, mode
rmrecursive, force, concurrency
rmdir
statfull Stats (dates, methods)
lstat
accessF_OK, R_OK, W_OK, X_OK
exists
unlink
rename
readlink
realpath
chmod
chown
utimes
truncate
symlink
link
mkdtemp
globconcurrency, gitIgnore

Not supported yet

APIDescriptionMain blocker / note
open / close / fstatFile descriptor–based I/O (open returns fd; read/write/fstat/close use it).Requires a cross-boundary fd mapping table (Arc<Mutex<HashMap<fd, File>>>), careful lifecycle and thread-safety; napi::Env is main-thread–only while async work runs in the thread pool.
opendirDirectory iterator (Dir / DirEnt stream).Not implemented yet; use readdir (optionally with recursive and withFileTypes) for directory listing.
watch / watchFileFile system watching (FSEvents / inotify / ReadDirectoryChangesW).Needs pushing a Rust event stream (e.g. via notify crate) into JS (e.g. napi::threadsafe_function); implementation is non-trivial and priority is under evaluation.

Planned extensions (from roadmap): stream APIs such as createReadStream / createWriteStream are higher difficulty (backpressure, pipe, etc.) and are long-term.

Each supported API has a dedicated doc page in the sidebar (e.g. readdir, readFile, glob) with basic usage, methods, performance (benchmark tables), and notes.

Sync variants

Supported APIs expose both async (e.g. readdir) and sync (e.g. readdirSync) forms. Import the same names from @rush-fs/core as you would from node:fs.

For full TypeScript signatures and option details, see the README Status & Roadmap  section.

Last updated on