lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Does lfs help?

http://www.keplerproject.org/luafilesystem/index.html

cheers,
Geoff

On 31/07/2007, at 8:34 AM, Stephane Bortzmeyer wrote:

[Warning: beginner]

I'm trying to do some very simple file and directories manipulation in
Lua. The first thing I want to do is to get all the files in a given
directory (I'll then examine them to find the one I'm interested in).

I cannot find a function to list all files in a directory.

Worse, I cannot find a comprehensive package with files and
directories handling. The "os" library only contains "remove" and
"rename" (why only these two?).

Is the only solution os.execute(string.format("ls %s", directory))
with parsing of the result?

Lua 5.0 on a Debian/Linux machine