@@ -69,8 +69,8 @@ for (const file of g2) {
69
69
}
70
70
71
71
// you can also pass withFileTypes: true to get Path objects
72
- // these are like a Dirent, but with some more added powers
73
- // check out http ://npm.im /path-scurry for more info on their API
72
+ // these are like a fs. Dirent, but with some more added powers
73
+ // check out https ://isaacs.github.io /path-scurry/classes/PathBase.html for more info on their API
74
74
const g3 = new Glob (' **/baz/**' , { withFileTypes: true })
75
75
g3 .stream ().on (' data' , path => {
76
76
console .log (
@@ -534,6 +534,12 @@ share the previously loaded cache.
534
534
called to determine whether any Path is a match or if its
535
535
children should be traversed, respectively.
536
536
537
+ The ` path ` argument to the methods will be a [ ` path-scurry ` ] ( https://isaacs.github.io/path-scurry/index.html )
538
+ [ ` Path ` ] ( https://isaacs.github.io/path-scurry/classes/PathBase )
539
+ object, which extends [ ` fs.Dirent ` ] ( https://nodejs.org/docs/latest/api/fs.html#class-fsdirent )
540
+ with additional useful methods like [ ` .fullpath() ` ] ( https://isaacs.github.io/path-scurry/classes/PathBase.html#fullpath ) ,
541
+ [ ` .relative() ` ] ( https://isaacs.github.io/path-scurry/classes/PathBase.html#relative ) , and more.
542
+
537
543
- ` follow ` Follow symlinked directories when expanding ` ** `
538
544
patterns. This can result in a lot of duplicate references in
539
545
the presence of cyclic links, and make performance quite bad.
@@ -574,9 +580,9 @@ share the previously loaded cache.
574
580
available, or ` 'linux' ` if not. Setting ` platform:'win32' ` on
575
581
non-Windows systems may cause strange behavior.
576
582
577
- - ` withFileTypes ` Return [ PathScurry ] ( http://npm.im/path-scurry )
578
- ` Path ` objects instead of strings. These are similar to a
579
- NodeJS ` Dirent ` object, but with additional methods and
583
+ - ` withFileTypes ` Return [ ` path-scurry ` ] ( http://npm.im/path-scurry )
584
+ [ ` Path ` ] ( https://isaacs.github.io/path-scurry/classes/PathBase.html ) objects instead of strings.
585
+ These are similar to a NodeJS ` fs. Dirent` object, but with additional methods and
580
586
properties.
581
587
582
588
` withFileTypes ` may not be used along with ` absolute ` .
@@ -585,10 +591,10 @@ share the previously loaded cache.
585
591
triggered.
586
592
587
593
- ` fs ` An override object to pass in custom filesystem methods.
588
- See [ PathScurry docs] ( http ://npm.im /path-scurry) for what can
594
+ See [ ` path-scurry ` docs] ( https ://isaacs.github.io /path-scurry/interfaces/FSOption.html ) for what can
589
595
be overridden.
590
596
591
- - ` scurry ` A [ PathScurry] ( http ://npm.im /path-scurry) object used
597
+ - ` scurry ` A [ ` PathScurry ` ] ( https ://isaacs.github.io /path-scurry/classes/PathScurryBase.html ) object used
592
598
to traverse the file system. If the ` nocase ` option is set
593
599
explicitly, then any provided ` scurry ` object must match this
594
600
setting.
0 commit comments