0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-03 09:31:22 -05:00

fs.walk performance improvement (denoland/deno_std#221)

Original: ccb452f775
This commit is contained in:
Vincent LE GOFF 2019-03-02 20:57:37 +01:00 committed by Ryan Dahl
parent ef30a88542
commit 428bf3c8a6

View file

@ -31,7 +31,9 @@ export async function* walk(
options.onError(err);
}
}
for (let f of ls) {
const length = ls.length;
for (var i = 0; i < length; i++) {
let f = ls[i];
if (f.isSymlink()) {
if (options.followSymlinks) {
f = await resolve(f);
@ -71,7 +73,9 @@ export function* walkSync(
options.onError(err);
}
}
for (let f of ls) {
const length = ls.length;
for (var i = 0; i < length; i++) {
let f = ls[i];
if (f.isSymlink()) {
if (options.followSymlinks) {
f = resolveSync(f);