lua-users home
lua-l archive

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


Ok, I see now what was wrong :) tFILES = forFiles("C:/","*.*") works great. Thanks Peter again.

2011/6/6 Attila <ejjeliorjarat@gmail.com>
I know LFS, and I used it many times. Now I want to be able to replace it with LuaJIT FFI interface, since I need just this directory/file iterator function. Therefore I don't need additional dlls. What Peter write should be good, but when I try to ran it, i got the following:
E:\LuaJIT>luajit files.lua
luajit: files.lua:59: missing declaration for symbol 'forFiles'
stack traceback:
files.lua:59: in main chunk
[C]: ?

59th line is:
tFILES = ffi.C.forFiles("C:\\")
Which was just put on the end of the script. Any idea?

2011/6/6 marbux <marbux@gmail.com>
On Mon, Jun 6, 2011 at 6:47 AM, steve donovan <steve.j.donovan@gmail.com> wrote:

> Why not just use LuaFileSystem?  There _might_ be case where it's too
> slow for the job, but you would have to push the file system hard to
> find that case ;)

Two example functions using LFS here,
<http://lua-users.org/wiki/DirTreeIterator>. Another on the LFS site
here, <http://keplerproject.github.com/luafilesystem/examples.html>.

I haven't tested any of them but had bookmarked them for possible later use.

Best regards,

Paul