Skip to main content

Module fs

Module fs 

Source
Expand description

The filesystem seam (spec/sync/README.md §4.2): the walk over .md files — each directory’s entries in bytewise order of their names, depth-first (§9: Node’s readdir sorts through libuv, so a port whose listing is unsorted sorts) — (mtime_ns, size) stats and reads, behind a trait so the sweep’s I/O stays out of the fixtures. A real implementation over std::fs and an in-memory one over a flat path map that walks the same way.

Structs§

FileStat
A file’s cheap change token.
MemFile
One in-memory file.
MemFileSystem
An in-memory filesystem (the fixture runner’s): files keyed by repo-relative path; the walk treats the /-separated paths as a directory tree and visits each directory’s entries in bytewise name order, depth-first, exactly as RealFileSystem does (§4.2). The root argument is ignored.
RealFileSystem
The operating system’s filesystem.

Constants§

IGNORED_DIRS
The directory names the walk skips.

Traits§

FileSystem
Where the fast path’s bytes come from. Paths are repo-relative with / separators; every method takes the repo root.

Functions§

is_ignored_dir
Whether a directory entry name is one the walk skips.