Help with auto download onto server using AddDir

Could some one please help me with this code.
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…"/*", true)) do
resource.AddFile(dir…"/"…v)
end
end

I’m trying to make it so it downloads files from an addon any help would be appropriated thanks.