On this page

0104: Deterministic directory walk order

Status: Proposed (default; pending owner confirmation)

Extends the cli filesystem API and its byte-sorted Fs.list ordering.

Context

Parallel directory enumeration must produce the same paths as a serial walk regardless of scheduling and without following symlink cycles.

Decision

Fs.walk and par.walk return regular files in depth-first pre-order, with entries sorted by byte name within each directory. Symlinks are not followed. Unreadable subdirectories are skipped and counted in reader status; an unreadable root returns an error. The C parallel walk lists directories in parallel and splices results in order on the caller; the interpreter uses the serial walk.

Consequences

Tools can merge output in walk order independently of worker scheduling. Ordering and unreadable-directory behavior need differential tests.