@loopback/docs
Version:
Documentation for LoopBack 4
37 lines (23 loc) • 874 B
Markdown
lang: en
title: 'API docs: boot.discoverfiles'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
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 | <code>string</code> | A glob pattern |
| root | <code>string</code> | Root folder to start searching for matching files |
<b>Returns:</b>
`Promise<string[]>`
Array of discovered files