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.
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]

Postby Nolram_07 » Fri Mar 17, 2017 6:05 pm

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: 10899
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Files in a directory [LUA]

Postby doublemax » Fri Mar 17, 2017 6:57 pm

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]

Postby Nolram_07 » Fri Mar 17, 2017 10:37 pm

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: 10899
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Files in a directory [LUA]

Postby doublemax » Fri Mar 17, 2017 11:36 pm

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


Return to “General Development”

Who is online

Users browsing this forum: No registered users and 1 guest