Skip to content

Commit 3cf13bb

Browse files
committed
docs: add better links to path-scurry docs
1 parent 08958fa commit 3cf13bb

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

README.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ for (const file of g2) {
6969
}
7070

7171
// 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
7474
const g3 = new Glob('**/baz/**', { withFileTypes: true })
7575
g3.stream().on('data', path => {
7676
console.log(
@@ -534,6 +534,12 @@ share the previously loaded cache.
534534
called to determine whether any Path is a match or if its
535535
children should be traversed, respectively.
536536

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+
537543
- `follow` Follow symlinked directories when expanding `**`
538544
patterns. This can result in a lot of duplicate references in
539545
the presence of cyclic links, and make performance quite bad.
@@ -574,9 +580,9 @@ share the previously loaded cache.
574580
available, or `'linux'` if not. Setting `platform:'win32'` on
575581
non-Windows systems may cause strange behavior.
576582

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
580586
properties.
581587

582588
`withFileTypes` may not be used along with `absolute`.
@@ -585,10 +591,10 @@ share the previously loaded cache.
585591
triggered.
586592

587593
- `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
589595
be overridden.
590596

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
592598
to traverse the file system. If the `nocase` option is set
593599
explicitly, then any provided `scurry` object must match this
594600
setting.

0 commit comments

Comments
 (0)