Skip to content

fs: add skipSymlinkDir option to skip symbolic dirs for fs.readdir

Rodrigo Muino Tomonari requested to merge github/fork/kylo5aby/fs-readdir into main
  • Add a skipSymlinkDir option to the fs.readdir to allow for behavior similar to the find [path] -print and find -L [path] -print commands. This option would control whether symbolic link directories are skipped or traversed during directory listing.
  • Ensure that checking if the current directory is a symlink leads to consistent file listings in fs.readdir([path], {withFileTypes: false}) and fs.readdir([path], {withFileTypes: true})

Refs: https://github.com/nodejs/node/issues/51858

Merge request reports

Loading