lua-users home
lua-l archive

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

On Wed, 2003-10-29 at 12:02, Gavin Wraith wrote:
> Is it possible to extend the os library with
> a directory-scanning function, like Perl's
> 'readdir', and still keep within ANSI C?
> Of course we can each implement something
> for our own platform but it would be nice
> to be able to do this in a more portable way.

There is no directory listing feature in ANSI C as far as I know. You
could popen a call to ls, but that's about all I can suggest.

It'd be more useful to write a library which loadlib can call, to add
these features in. Perhaps similar to the POSIX library which used to
exist for Lua 4.0


Daniel Silverstone             
Hostmaster, Webmaster, and Chief Code Wibbler: Digital-Scurf Unlimited
GPG Public key available from       KeyId: 20687895