Optional
absoluteOptional
baseIf set to true
, then patterns without slashes will be matched against
the basename of the path if it contains slashes.
Optional
braceEnables Bash-like brace expansion.
Optional
caseEnables a case-sensitive mode for matching files.
Optional
concurrencySpecifies the maximum number of concurrent requests from a reader to read directories.
Optional
Readonly
cwdThe current working directory in which to search.
Optional
deepSpecifies the maximum depth of a read directory relative to the start directory.
Optional
dotAllow patterns to match entries that begin with a period (.
).
Optional
Readonly
expandIf set to true
, globby
will automatically glob directories for you. If you define an Array
it will only glob files that matches the patterns inside the Array
. You can also define an Object
with files
and extensions
like in the example below.
Note that if you set this option to false
, you won't get back matched directories unless you set onlyFiles: false
.
Optional
extglobEnables Bash-like extglob
functionality.
Optional
followIndicates whether to traverse descendants of symbolic link directories.
Optional
fsCustom implementation of methods for working with the file system.
Optional
Readonly
gitignoreRespect ignore patterns in .gitignore
files that apply to the globbed files.
Performance note: This option searches for all .gitignore
files in the entire directory tree before globbing, which can be slow. For better performance, use ignoreFiles: '.gitignore'
to only respect the root .gitignore
file.
Optional
globstarEnables recursively repeats a pattern containing **
.
If false
, **
behaves exactly like *
.
Optional
ignoreAn array of glob patterns to exclude matches. This is an alternative way to use negative patterns.
Optional
Readonly
ignoreGlob patterns to look for ignore files, which are then used to ignore globbed files.
This is a more generic form of the gitignore
option, allowing you to find ignore files with a compatible syntax. For instance, this works with Babel's .babelignore
, Prettier's .prettierignore
, or ESLint's .eslintignore
files.
Performance tip: Using a specific path like '.gitignore'
is much faster than recursive patterns.
Optional
markMark the directory path with the final slash.
Optional
matcherOptional
objectReturns objects (instead of strings) describing entries.
Optional
onlyReturn only directories.
Optional
onlyReturn only files.
Optional
statsEnables an object mode (objectMode
) with an additional stats
field.
Optional
suppressBy default this package suppress only ENOENT
errors.
Set to true
to suppress any error.
Optional
throwThrow an error when symbolic link is broken if true
or safely
return lstat
call if false
.
Optional
uniqueEnsures that the returned entries are unique.
Return the absolute path for entries.