VINDICTA.TOP
Filesystem · Function
Bunni.fun
ChocoSploit
Cryptic
Potassium
Seliware
SirHurt
Solara
Velocity
Volcano
Volt
Wave
Xeno

listfiles

Returns a list of all files and folders in a directory.

function listfiles(pathpathstringPath to the folder to list.: string): {string}{string}Array of full paths for each entry.

Usage

List workspace root
for _, path in ipairs(listfiles(".")) do
	print(path, isfolder(path) and "[dir]" or "[file]")
end