fivem-docs
fivem-docs copied to clipboard
io.readdir is not iterable with ipairs
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