[b758a2]: / code / getImagePaths.lua

Download this file

14 lines (12 with data), 314 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
function getImagePaths(folder)
dirs = dir.getdirectories(folder);
imagePaths = {}
for i,dirpath in ipairs(dirs) do
command = 'find ' .. dirpath .. ' -iname "*.png"'
res = sys.execute(command)
for str in string.gmatch(res, "([^\n]+)") do
table.insert(imagePaths, str)
end
end
return imagePaths
end