time walkdir
This commit is contained in:
parent
24c7ec82ea
commit
35592be6e9
1 changed files with 11 additions and 9 deletions
|
|
@ -157,6 +157,17 @@ const defaultOptions: WalkerOptions = {
|
|||
returnRelativeUrisPaths: false,
|
||||
};
|
||||
|
||||
export async function* walkDirAsync(
|
||||
path: string,
|
||||
ide: IDE,
|
||||
_optionOverrides?: WalkerOptions,
|
||||
): AsyncGenerator<string> {
|
||||
const start = Date.now();
|
||||
const options = { ...defaultOptions, ..._optionOverrides };
|
||||
yield* new DFSWalker(path, ide, options).walk();
|
||||
console.log(`walkDir took ${Date.now() - start}ms`);
|
||||
}
|
||||
|
||||
export async function walkDir(
|
||||
uri: string,
|
||||
ide: IDE,
|
||||
|
|
@ -169,15 +180,6 @@ export async function walkDir(
|
|||
return urisOrRelativePaths;
|
||||
}
|
||||
|
||||
export async function* walkDirAsync(
|
||||
path: string,
|
||||
ide: IDE,
|
||||
_optionOverrides?: WalkerOptions,
|
||||
): AsyncGenerator<string> {
|
||||
const options = { ...defaultOptions, ..._optionOverrides };
|
||||
yield* new DFSWalker(path, ide, options).walk();
|
||||
}
|
||||
|
||||
export async function walkDirs(
|
||||
ide: IDE,
|
||||
_optionOverrides?: WalkerOptions,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue