lovr.filesystem.getDirectoryItems

Returns a sorted table containing all files and folders in a single directory.

table = lovr.filesystem.getDirectoryItems(path)

Arguments

NameTypeDescription
pathstring The directory.

Returns

NameTypeDescription
tableitems A table with a string for each file and subfolder in the directory.

Notes

This function calls table.sort to sort the results, so if table.sort is not available in the global scope the results are not guaranteed to be sorted.

See also