node/lib/internal/vfs
Matteo Collina ea60060617
vfs: avoid recursive readdir symlink cycles
Track the active MemoryProvider recursive readdir traversal path so
circular symlinks to directories stop recursing while still listing
the symlink entries.

Add sync, promise, and withFileTypes coverage.

Fixes: https://github.com/nodejs/node/issues/64148
Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/64168
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
2026-06-30 10:08:40 +00:00
..
providers vfs: avoid recursive readdir symlink cycles 2026-06-30 10:08:40 +00:00
dir.js
errors.js vfs: dispatch fs/promises to mounted VFS instances 2026-05-29 17:57:34 +00:00
fd.js
file_handle.js
file_system.js vfs: dispatch fs/promises to mounted VFS instances 2026-05-29 17:57:34 +00:00
provider.js
router.js vfs: dispatch fs/promises to mounted VFS instances 2026-05-29 17:57:34 +00:00
setup.js vfs: dispatch fs/promises to mounted VFS instances 2026-05-29 17:57:34 +00:00
stats.js lib: add lint rule to enforce use of kEmptyObject 2026-06-10 10:56:56 +00:00
streams.js
watcher.js lib: add lint rule to enforce use of kEmptyObject 2026-06-10 10:56:56 +00:00