Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions content/docs/developers/sandbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ local files3 = io.readdir("/absolute/path/to/resource")
local files4 = io.readdir("/absolute/path/to/resource/assets")
```

Because `io.readdir()` returns a handle rather than a plain table, it cannot be iterated with `ipairs` or `pairs`. Use its `lines()` iterator to read each entry:

```lua
local files = io.readdir("@myResource/")
for file in files:lines() do
Expand Down