You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 262f0ec
Browse filesBrowse the repository at this point in the historyBrowse files
fs: stop stat()ing every entry in recursive readdir
readdir({ recursive: true }) asked the binding for names only and then
called internalModuleStat() on every entry to find the directories to
descend into; with withFileTypes it built the Dirents and still stat()ed
every entry that was not already a directory. Both variants also ran
path.join() and path.relative() per entry to build the relative result.
Ask the binding for file types in all cases, descend into directories
directly, and only stat() symbolic links and entries of unknown type
(which is what could point to a directory). The relative name is the
parent's prefix plus the entry name. Results, their order and the
symlink-following behavior are unchanged for fs.readdirSync, fs.readdir
and fs.promises.readdir.
The known_issues test for Buffer paths (#58892) called back without
checking the error; the error now reaches the callback instead of being
thrown from the completion handler, so the test asserts success to keep
expressing the issue.
Signed-off-by: Shelley Vohr <[email protected]>
PR-URL: #65487
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Gürgün Dayıoğlu <[email protected]>
constrelative=prefix==='' ? name : `${prefix}${pathModule.sep}${name}`;
1761
+
letisDirectory;
1762
+
if(context.withFileTypes){
1763
+
constdirent=getDirent(dir,name,types[i]);
1764
+
ArrayPrototypePush(context.results,dirent);
1765
+
// Follow symbolic links to directories, see https://github.com/nodejs/node/issues/52663
0 commit comments