Folder Directory

Hello,

I was wondering if someone would be able to help me with this line of lua.

[lua]-- A function to include a plugin’s items.
function openAura.plugin:IncludeItems(directory)
for k, v in pairs( _file.FindInLua(directory…"/items/*.lua") ) do
openAura:IncludePrefixed(directory…"/items/"…v);
end;
end;[/lua]

I just want to know whether it would be possible to change this code some way so that it will allow me to get the lua inside of sub folders which appears under the items folder. For example “items/guns”, I have messed around with it quite a few times and it didn’t work.

Thank you.

[lua]-- A function to include a plugin’s items.
function openAura.plugin:IncludeItems(directory)
for k, v in pairs( _file.FindInLua(directory…"/*.lua")) do
openAura:IncludePrefixed(directory…v)
end
end[/lua]

I don’t see why that wouldn’t work. Just input the whole directory (i.e. /items/guns).

I would do that but I have more than one folder, I have guns, medical, misc etc. I was wondering without creating 10 different lua lines, I could just make it list all the folders below the items.

It would probably require just as many lines to just improve that function.

Alright, thank you for your help.