From a9c123cc6634b77353a9dd6efe689ff7377b640c Mon Sep 17 00:00:00 2001 From: sync <68277325+unitysync@users.noreply.github.com> Date: Mon, 17 Mar 2025 02:27:23 +1000 Subject: [PATCH] chore(ox_lib): add docs for getFilesInDirectory --- .../Modules/GetFilesInDirectory/Server.mdx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 pages/ox_lib/Modules/GetFilesInDirectory/Server.mdx diff --git a/pages/ox_lib/Modules/GetFilesInDirectory/Server.mdx b/pages/ox_lib/Modules/GetFilesInDirectory/Server.mdx new file mode 100644 index 000000000..11db651d4 --- /dev/null +++ b/pages/ox_lib/Modules/GetFilesInDirectory/Server.mdx @@ -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`