CCCPaste

f0387638cba98

local function find_files(dir)
local files = {}
local file_list = io.popen("ls -R " .. dir)
for line in file_list:lines() do
if line:match("%.lua$") then
table.insert(files, line)
end
end
file_list:close()
return files
end

local files = find_files("startbg/")

for i, file in ipairs(files) do
print(file)
end