Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions pages/ox_lib/Modules/GetFilesInDirectory/Server.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Server

## lib.getFilesInDirectory
Gets a list of all files in a specified resource directory, along with the file count

```lua
lib.getFilesInDirectory(path, pattern)
```

- path: `string`
- The relative or absolute path to the directory where files should be listed.
- pattern: `string`
- Pattern to check for when searching for files.

Returns:
- files: `string[]`
- fileCount: `number`