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:
parent
ef30a88542
commit
428bf3c8a6
1 changed files with 6 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue