I think you want to return the table like this:
<API name here>.<API function name here> = function(...)
<CODE>
return res
end
So you don't need to set the name. You can use it like this:
local dataFile = <API name here>.<API function name here>(…)If you want to return a directory, you can save the name of the files as the keys of the table:
{ startup = {…} [newFile] = {…}}You can add the files like this:
<API name here>.<API function name here> = function(...)
<get the files of the directory and iterate them>
for ... do
...
directory[name] = data
...
end
...
return directory
end
I think you want to return the table like this:
<API name here>.<API function name here> = function(...)
<CODE>
return res
end
So you don't need to set the name. You can use it like this:
local dataFile = <API name here>.<API function name here>(…)If you want to return a directory, you can save the name of the files as the keys of the table:
{ startup = {…} [newFile] = {…}}You can add the files like this:
<API name here>.<API function name here> = function(...)
<get the files of the directory and iterate them>
for ... do
...
directory[name] = data
...
end
...
return directory
end