diff options
Diffstat (limited to 'src/deepReadDir.tsx')
-rw-r--r-- | src/deepReadDir.tsx | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/src/deepReadDir.tsx b/src/deepReadDir.tsx deleted file mode 100644 index ec585ec..0000000 --- a/src/deepReadDir.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import {lstat, readdir} from 'node:fs/promises' -import {join} from 'node:path' - -const deepReadDir = async (dirPath: string): Promise<string[]> => await Promise.all( - (await readdir(dirPath)).map(async (entity) => { - const path = join(dirPath, entity) - return (await lstat(path)).isDirectory() ? await deepReadDir(path) : path - }), -).then(arr => arr.flat()); - - -export default deepReadDir; |