---
lang: en
title: 'API docs: boot.loadclassesfromfiles'
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.loadclassesfromfiles.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/boot](./boot.md) &gt; [loadClassesFromFiles](./boot.loadclassesfromfiles.md)

## loadClassesFromFiles() function

Returns an Array of Classes from given files. Works by requiring the file, identifying the exports from the file by getting the keys of the file and then testing each exported member to see if it's a class or not.

<b>Signature:</b>

```typescript
export declare function loadClassesFromFiles(files: string[], projectRootDir: string): Constructor<{}>[];
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  files | string\[\] | An array of string of absolute file paths |
|  projectRootDir | string | The project root directory |

<b>Returns:</b>

[Constructor](./context.constructor.md)<!-- -->&lt;{}&gt;\[\]

An array of Class constructors from a file


