aboutsummaryrefslogtreecommitdiff
path: root/src/deepReadDir.tsx
diff options
context:
space:
mode:
authoreug-vs <eugene@eug-vs.xyz>2022-10-22 20:06:01 +0300
committereug-vs <eugene@eug-vs.xyz>2022-10-22 20:06:01 +0300
commiteeb3bcec19b15e6b7d30f983c8f613dedb1a9b32 (patch)
treefc3b0be53cb839be0a02106b9d140f2afb0c98b6 /src/deepReadDir.tsx
parent82de4ac15e6a942c3b004efad24a3dc8a4ab7edf (diff)
downloadbenzin-next-eeb3bcec19b15e6b7d30f983c8f613dedb1a9b32.tar.gz
refactor: separate Nginx adapter
Diffstat (limited to 'src/deepReadDir.tsx')
-rw-r--r--src/deepReadDir.tsx12
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;