[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Files and directories manipulation
- From: Stephane Bortzmeyer <bortzmeyer@...>
- Date: Mon, 30 Jul 2007 22:34:26 +0200
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