@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
38 lines (24 loc) • 963 B
Markdown
lang: en
title: 'API docs: boot.discoverfiles'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/strongloop/loopback-next/tree/master/packages/boot
permalink: /doc/en/lb4/apidocs.boot.discoverfiles.html
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/boot](./boot.md) > [discoverFiles](./boot.discoverfiles.md)
## discoverFiles() function
Returns all files matching the given glob pattern relative to root
<b>Signature:</b>
```typescript
export declare function discoverFiles(pattern: string, root: string): Promise<string[]>;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| pattern | string | A glob pattern |
| root | string | Root folder to start searching for matching files |
<b>Returns:</b>
Promise<string\[\]>
Array of discovered files