lua-users home
lua-l archive

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


On Mon, Sep 29, 2003 at 01:18:13AM -0600, Andy Bushnell wrote:

> Please excuse my ignorance (i'm a Lua newbie).

Me too ;)
 
> I have a 'C' function (getFileListing) that has been registered with Lua. It
> compiles a list of files in the current working directory. Everything works
> fine until I try *returning* this info to Lua. How can I do it?

A similar function, dir(), is implemented in poslib and runs very well under
Linux and perhaps on other Unices. Windows ? I don't know.

http://www.lmf-di.puc-rio.br/~terra/projects/poslib_index.html



>a=dir()
>for i=1,getn(a) do print(a[i]) end

.
..
Makefile
lposlib.c
modemuncher.c
pt.lua
ptf.lua
pts.lua
readme.txt
lua.c
lua.o
lposlib.o
plua