lua-users home
lua-l archive

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


I've written a simple library for listing directories:
	http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/ldir.tar.gz	

It is based on a very simple interface that should be easy to implement for
several platforms. I include an implementation for POSIX systems and I hope
to get contributions for all other platforms that matter. The README contains
some suggestions of starting points.

Here is the abstraction that I use; it should be easier to port than than to
provide a full readdir emulation:

 typedef ... *dir_handle;
 dir_handle dir_open(const char *path);
 int dir_close(dir_handle d);
 const char *dir_entry(dir_handle d);
 const char *dir_error(void);

If you're only interested in POSIX systems, then you don't need this library,
because my POSIX library already has this and more.

All suggestions welcome. Enjoy.
--lhf