As of now, the best way of doing this is to implement it as an extension (via Flacko's suggestion). There are some precooked code out there if you need them. The alternative is to use the system call to get the list of files (typically ls or dir) The problem with this is that Lua requires a separate interface for system calls, and it'll actually open up a standalone terminal rather than buffering the io to a temporary file, therefore it's not ideal.
Prewritten extensions:
http://keplerproject.github.com/luafilesystem/