local dir = ""
local files = love.filesystem.getDirectoryItems(dir)
function love.draw()
for i,v in ipairs(files) do
love.graphics.print(v, 0, i*10)
end
end
this one works, but if i change the dir to something like: "C:/Users/Username/Documents" it doesnt list anything. and i also tried giving the complete directory to the main folder and it doesnt work too.
love.filesystem.setIdentity("testFolder")
local files = love.filesystem.getDirectoryItems("")
function love.draw()
for i,v in ipairs(files) do
love.graphics.print(v, 0, i*10)
end
end
and it read files from testFolder and the folder where i have the main.lua. that's ok, but when i made the .exe file it stopped working (worked fine .love)
Files are read from a different directory when in .exe's vs .love's. That might be the issue.
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim