Force Downloader Help

Is there anyway I can put a entire folder in my lua or do I have to add every single file?

I’m using

resource.AddFile(“file path”)

for every file and there’s to many. Is there a trick to do this to make it go faster? Or can I just add a whole folder?

From the wiki:

[lua]
function AddDir(dir) – recursively adds everything in a directory to be downloaded by client
local list = file.FindDir("…/"…dir…"/*")
for _, fdir in pairs(list) do
if fdir != “.svn” then – don’t spam people with useless .svn folders
AddDir(dir…"/"…fdir)
end
end

for k,v in pairs(file.Find("../"..dir.."/*")) do
	resource.AddFile(dir.."/"..v)
end

end

AddDir(“models/yourmodels”)
[/lua]