[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Files and directories manipulation
- From: Geoff Leyland <geoff_leyland@...>
- Date: Tue, 31 Jul 2007 08:39:35 +1200
Does lfs help?
On 31/07/2007, at 8:34 AM, Stephane Bortzmeyer wrote:
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