Skip to content

Interface: GlobOptions ​

The options of Glob and GlobSync.

Properties ​

absolute? ​

optional absolute?: boolean

Give absolute paths. When false, the results of a relative pattern are relative to cwd, and the results of an absolute pattern are absolute.

Default ​

ts
false

cwd? ​

optional cwd?: string

The directory the relative patterns are resolved from and the relative results are relative to; a relative cwd is resolved from the current directory.

Default ​

ts
process.cwd()

dot? ​

optional dot?: boolean

Let the wildcards (*, **, ?, [...]) match the names starting with a dot. A pattern segment starting with a dot (.config/*) matches them anyway.

Default ​

ts
false

follow? ​

optional follow?: boolean

Follow the symbolic links to directories while expanding **; a link not followed is still matched by a trailing **. The links named by the other segments are always followed, and a link cycle is walked once.

Default ​

ts
false

ignore? ​

optional ignore?: string | string[]

The patterns of the paths to exclude from the results, matched against the paths relative to cwd with / separators (a leading ./ is dropped). They match the names starting with a dot, and dir/** excludes dir and everything under it. Excluded directories are still walked.

Default ​

ts
none

nocase? ​

optional nocase?: boolean

Match the names case-insensitively.

Default ​

ts
true on macOS and Windows (whose file systems usually are case-insensitive), false elsewhere

nodir? ​

optional nodir?: boolean

Give the files only (and the other entries which are not directories), not the directories.

Default ​

ts
false

Released under the MIT License.