Skip to content

Instantly share code, notes, and snippets.

@shakesoda
Created January 21, 2014 21:14
Show Gist options
  • Save shakesoda/8548514 to your computer and use it in GitHub Desktop.
Save shakesoda/8548514 to your computer and use it in GitHub Desktop.
local _lfsgdi = love.filesystem.getDirectoryItems or love.filesystem.enumerate
function love.filesystem.getDirectoryItems(dir, callback)
if not callback then
return _lfsgdi(dir)
else
local files = _lfsgdi(dir)
for i, path in ipairs(files) do
callback(path)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment