Skip to main content


bud.fs.find searches the filesystem for matching files. Matches are returned as an array.


Simple usage: pass a search string or array of strings

const scripts = await bud.fs.find(`src/**/*.js`)

You can use an options object for more complex searches:

type FindOptions = {
matching?: string | string[]
filter?: (fileInspect: InspectResult) => boolean | Promise<boolean>
files?: boolean
directories?: boolean
recursive?: boolean
ignoreCase?: boolean
const scripts = await bud.fs.find({
matching: `src/**/*.js`,
files: true,
ignoreCase: true,