LoTROInterface

LoTROInterface (https://www.lotrointerface.com/forums/index.php)
-   General Authoring Discussion (L) (https://www.lotrointerface.com/forums/forumdisplay.php?f=22)
-   -   Is it possible to list files in a directory? (https://www.lotrointerface.com/forums/showthread.php?t=3849)

Bailey The Cat 07-09-2021 08:32 PM

Is it possible to list files in a directory?
 
I'm very new to LUA in general, especially with the limited APIs given to us for these plugins. Is there a command I can use to parse a directory for files (like a "dir" or "ls" command) for purposes of dynamically populating a context menu?

Garan 07-09-2021 09:52 PM

Nope. The API is extremely limited. Very little of the Lua file library is implemented. The latest API (U25, 11-05-2019) docs are at:
https://www.lotrointerface.com/downl...mentation.html

We can access .lua and .plugindata files as long as we know the file names ahead of time or the user provides them (that is trickier but can be done) but that is it. No other file types and no directory functionality at all. Note, access to .plugindata files is also very limited but at least there are workarounds for that (see https://www.lotro.com/forums/showthr...gins+for+noobs if you haven't already)

Bailey The Cat 07-09-2021 10:22 PM

Quote:

Originally Posted by Garan (Post 12664)
Nope. The API is extremely limited. Very little of the Lua file library is implemented. The latest API (U25, 11-05-2019) docs are at:
https://www.lotrointerface.com/downl...mentation.html

We can access .lua and .plugindata files as long as we know the file names ahead of time or the user provides them (that is trickier but can be done) but that is it. No other file types and no directory functionality at all. Note, access to .plugindata files is also very limited but at least there are workarounds for that (see https://www.lotro.com/forums/showthr...gins+for+noobs if you haven't already)

Thanks for the quick reply! Its a shame I won't be able to do what I wanted with this plugin, but I'll find some sort of alternative.


All times are GMT -5. The time now is 11:47 PM.

vBulletin® - Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
© MMOUI