Skip to main content

Function: findFilesRecursivelyStringIncludes()

findFilesRecursivelyStringIncludes(path: PathLike, include: string): AsyncIterableIterator<string>

Parameters

ParameterTypeDescription
pathPathLikeThe path in which to find files. This can be a string, buffer, or URL.
includestring

The string pattern which must be present in the file name.

Note that we do not support a full globby pattern using asterisk for wildcards. It has to be an exact match with String.includes

Returns

AsyncIterableIterator<string>

An AsyncIterableIterator of all the files. To loop over these use for await (const file of findFilesRecursivelyStringIncludes(path, fileNameEndsWith)) {}

Source

lib/findFilesRecursively.ts:77