Calls a callback function for every sub-directory in the given path.
DirectoryGetEntries( <path>, <callback>, [<end_to_start>] )
- path: The directory to iterate.
- callback: The callback that will be called for each item in the directory. This function must return true for the loop to continue.
- end_to_start: Makes the function iterate the directory in reverse order. Optional, defaults to false.
-- Print each file and whether or not it's a directory. DirectoryGetEntries(Path, function(File, IsDirectory) print(File, IsDirectory) end)
No additional notes.
Added a third argument that specifies whether or not to return the list of files and folders in reverse order.
Changes prior to this version were not adequately tracked.