Difference between revisions of "Lua:getDirectoryList"

From Cheat Engine
Jump to navigation Jump to search
m
m
 
(One intermediate revision by the same user not shown)
Line 37: Line 37:
  
 
== See also ==
 
== See also ==
* [[Lua:getFileList|getFileList]]
 
 
* [[Lua:getFileList|getFileList]]
 
* [[Lua:getFileList|getFileList]]

Latest revision as of 19:13, 11 July 2025

function getDirectoryList(Path, [SearchSubDirs]) : Table

Returns an indexed table containing the names of directories in the specified path.

Function Parameters[edit]

Parameter Type Description
Path String The directory path to search.
SearchSubDirs Boolean (optional) If true, searches subdirectories recursively. Default is false.

Returns[edit]

Table — An indexed table with the names of directories found.

Examples[edit]

local dirs = getDirectoryList(getAutorunPath())
for i, name in ipairs(dirs) do
  print(name)
end

-- Search recursively
local allDirs = getDirectoryList(getAutorunPath(), true)
for i, name in ipairs(allDirs) do
  print(name)
end

See also[edit]