Skip to main content
Returns a table of strings - one entry per file and subfolder inside path.
path is workspace-relative. Call listfiles() with no argument and you get the workspace root itself - note this only works when the argument is omitted entirely, passing an empty string (listfiles("")) does not. The listing is one level deep - subfolders show up as entries, but their contents don’t. To walk a tree, recurse with isfolder on each entry.

Parameters

Returns

{string} - a table of full paths for every file and subfolder inside path. The order is not guaranteed. Empty folders return an empty table.

Example

Enumerate every hub script you’ve saved under hubs/:
Returned paths use backslashes as separators (hubs\blade_ball.luau), even though the paths you pass in use forward slashes.