-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathreaddirp.node.txt
43 lines (38 loc) · 2.43 KB
/
readdirp.node.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
┏━━━━━━━━━━━━━━┓
┃ READDIRP ┃
┗━━━━━━━━━━━━━━┛
ALTERNATIVES ==> # - readdirp (preferred with Node):
# - most high-profile
# - streaming, filtering, maxDepth, symlinks
# - deno walk (preferred with Deno):
# - Deno core
# - streaming, filtering, maxDepth, symlinks
# - recursive-readdir:
# - filtering
# - fs-readdir-recursive:
# - filtering
# - readdir-enhanced:
# - less high-profile
# - streaming, filtering, maxDepth
VERSION ==> #4.1.2
#Node/Deno/Bun
READDIRP('PATH'[, OPTS]) #Calls FS.readdir() recursively.
->FILEINFO_STREAM #STREAM:
# - is closed when all files have been processed successfully or not
# - emits 'warn|error' ERROR
#OPTS:
# - fileFilter|directoryFilter FUNC(FILEINFO)->BOOL
# - type STR: whether to call FUNC() on:
# - 'files' (def)
# - 'directories'
# - 'files_directories'
# - 'all': anything, including character devices, etc.
# - depth NUM (def: none): max depth
# - lstat BOOL (def: false): use FS.lstat() instead of FS.stat()
#Uses OPTS.bigint true of FS.[l]stat() if Windows
FILEINFO.basename #Filename
FILEINFO.path #Path relative to OPTS.root
FILEINFO.fullPath #Absolute path
FILEINFO.stats #STAT or DIRENT according to OPTS.alwaysStat (def: false)
readdirpPromise('PATH'[, OPTS])
->PROMISE_FILEINFO_ARR #Same but all at once