Files in a directory [LUA]

This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
Post Reply
Nolram_07
Earned a small fee
Earned a small fee
Posts: 11
Joined: Fri Mar 17, 2017 5:56 pm

Files in a directory [LUA]

Post by Nolram_07 »

Hello!
I am trying to get the name, extension and full path of files in a directory.
I use Lua, but I do not know how to do it.

Someone to help me get this
Thanks a lot.

Alguien que hable español :?: [-o<
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Files in a directory [LUA]

Post by doublemax »

Is this wxLua or just plain Lua?

If it's wxLua, there should be the equivalent of wxDir::GetAllFiles() in its API.
http://docs.wxwidgets.org/trunk/classwx ... 28d0ada848
http://wxlua.sourceforge.net/docs/wxluaref.html#wxDir

Edit: After one minute of Googling:
http://stackoverflow.com/a/5303802
Use the source, Luke!
Nolram_07
Earned a small fee
Earned a small fee
Posts: 11
Joined: Fri Mar 17, 2017 5:56 pm

Re: Files in a directory [LUA]

Post by Nolram_07 »

Thanks,
Yes it's wxLua.
Which recommends, if I am managing a directory with more than 30.000 files? lua pure function or wx GetallFiles? Which has better performance?
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Files in a directory [LUA]

Post by doublemax »

I wouldn't expect a big difference between the two, the main work will be on the OS side anyway.
Use the source, Luke!
Post Reply