@discoveryjs/scan-fs
Advanced tools
Changelog
4.0.0 (2024-03-15)
{ basedir: <string> }
scanFs()
definition to allow omitting of options
argumentresolveSymlinks
option to enable symlink resolving, a symlink resolving is disabled by defaultposixPath
field to File
and Symlink
interfacesencoding
option for Rule
to specify an encoding for a file contenttest
option to apply to POSIX paths disregarding of operating system usedinclude
and exclude
options to take POSIX paths disregarding of operating system used which are supposed to be relative to basedir
scanFs()
:
basedir
fieldstat
object with fields pathsScanned
and filesTested
File[]
array with additional fields
// before
const files = await scanFs(...)
console.log(files, files.symlinks);
// after
const { files, symlinks } = await scanFs(...)
console.log(files, symlinks);
NormRule
type into MatchRule
ScanResult
type to define returning type of scanFs()
Changelog
3.0.0 (2022-06-09)
require('@discoveryjs/scan-fs')
into require('@discoveryjs/scan-fs').scanFs
Symlink
internal class for symlinks entriesscanFn()
invocation with no optionsinclude
option is usedChangelog
2.0.0 (2022-04-26)
basedir
to use a single include path when include
is not providedextract
option for a file rule to not accept an array of functionsnode_modules
and .git
paths by defaultsymlinks
and errors
fields to resultsize
field in a file entry