fivem-docs icon indicating copy to clipboard operation
fivem-docs copied to clipboard

io.readdir is not iterable with ipairs

Open XenoS-ITA opened this issue 11 months ago • 0 comments

io.readdir from the new sandboxing is not iterable with ipairs, the only way i found is to use the lines method.

example:

local files = io.readdir("@myResource/")
for file in files:lines() do
    print(file) -- Process each file
end

probably currently missing a correct implementation for ipairs and pairs

XenoS-ITA avatar Jan 18 '25 20:01 XenoS-ITA