Lists files in the specified directory path, filtering by a regular
expression pattern.
The returned entries are configurable using the additional options,
such as listing recursively to subdirectories, and filter specific file and/or
directory names using a regular expression.
The additional options can be an object or a regex pattern to specify only
the match field. If passed as a RegExp object, the rest
options (except the match field) for reading the directory will uses default options.
If the options argument not specified (or undefined), then it uses the
default value:
As of version 1.0.0, this function now accepts file URL paths. This can be
either a string URL path or a URL object, and it must follow the 'file:' protocol.
An URIError will be thrown if the specified file URL path has invalid file
URL syntax or is used with unsupported protocols.
A promise that resolves with an array of string representing the
entries result excluding '.' and '..' or an empty array ([])
if any files and directories does not match with the specified filter options.
Lists files in the specified directory path, filtering by a regular expression pattern.
The returned entries are configurable using the additional options, such as listing recursively to subdirectories, and filter specific file and/or directory names using a regular expression.
The additional
optionscan be an object or a regex pattern to specify only the match field. If passed as aRegExpobject, the rest options (except thematchfield) for reading the directory will uses default options.If the
optionsargument not specified (orundefined), then it uses the default value:History
1.0.0
As of version 1.0.0, this function now accepts file URL paths. This can be either a string URL path or a
URLobject, and it must follow the'file:'protocol. AnURIErrorwill be thrown if the specified file URL path has invalid file URL syntax or is used with unsupported protocols.0.1.0
Added in version 0.1.0.