> For the complete documentation index, see [llms.txt](https://away-from-keyboard.gitbook.io/afkhandler/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://away-from-keyboard.gitbook.io/afkhandler/methods/load.md).

# load

*public async* load\<T>(**dir**: string, **callback**?: (**file**: T, **fileName**: string) => [Awaited](/afkhandler/utils.md)\<unknown>)

* **dir**: directory to load
* **callback**: function executed when a file is loaded, file corresponds to the loaded file and fileName corresponds to the name of that file

```javascript
client.load("src/my-stuff", (file, fileName) => {
console.log("Loaded file " + fileName)
})
```
