You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**encoding** - file encoding (defaults to 'utf8')
55
+
-**exclude** - a regex pattern or array to specify filenames to ignore
56
+
-**excludeDir** - a regex pattern or array to specify directories to ignore
57
+
-**match** - a regex pattern or array to specify filenames to operate on
58
+
-**matchDir** - a regex pattern or array to specify directories to recurse
59
+
-**recursive** - whether to recurse subdirectories when reading files (defaults to true)
60
+
-**reverse** - sort files in each directory in descending order
61
+
-**shortName** - whether to aggregate only the base filename rather than the full filepath
62
+
-**sort** - sort files in each directory in ascending order (defaults to true)
63
+
- A reverse sort can also be achieved by setting the sort option to 'reverse', 'desc', or 'descending' string value.
64
+
-**doneOnErr** - control if done function called on error (defaults to true)
65
+
-**sync** : boolean = false - results are returned inline and no callbacks are used
66
+
-**shortName** : boolean = false||'relative' - instead of fullpath file names, just get the names or relative item names
67
+
-**recursive** : boolean = true - traverse through all children of given path
68
+
-**excludeHidden** : boolean - hidden files will be ignored (files starting with a dot are ignored)
69
+
-**valuetizer** : (stat, fileName, filePath) - A function of (stat, fileName, fileFullPath) . When null returned, item is skipped in end results
70
+
46
71
#### readFilesStream
47
72
Sequentially read the content of each file in a directory, passing the contents to a callback, optionally calling a finished callback when complete. The options and finishedCallback arguments are not required.
-**sync**=false - DO NOT USE for promiseFiles, will cause unexpected behavior
284
311
-**shortName**=false||'relative' - instead of fullpath file names, just get the names or relative item names
285
312
-**recursive**=true - traverse through all children of given path
313
+
-**valuetizer** - A function of (stat, fileShortName, fileFullPath) . When null returned, item is skipped in end results
286
314
287
315
## History
288
316
path-reader is a fork of node-dir. The original maintainer of node-dir, @fshost, has not updated nor been heard from in some time. Use path-reader, it is far superior to node-dir.
0 commit comments