ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. pathListDir

Function

pathListDir

ServerFilesIdentical to MTA:SA

Returns a list of names in a resource folder; folder names end with /.

Syntax

table pathListDir(string path)

Arguments

pathstring
Folder path ("" = resource folder).

Returns

A table of names, or false.

Example

for _, name in ipairs(pathListDir("maps") or {}) do
    if name:sub(-4) == ".xml" then outputDebugString("Mapa: " .. name) end
end

See also