|
Luiz Henrique de Figueiredo wrote:
But perhaps it is easy to write a small portable library for directory processing. It can't be hard to write a readdir emulation for other platforms. It's probably already available somewhere in the web and so it'll be simply a matter of wrapping it for Lua (using the relevant POSIX binding). If someone knows of a multiplatform readdir emulation, please let me know. --lhf
Hi!as we noted some time ago, the LuaCheia code has had this functionality. The code is still there, but currently not used (as it is pending to be made into a module)
http://cvs.sourceforge.net/viewcvs.py/luacheia/luacheia/src/libcheia/cheiafs.c?rev=1.17&view=auto The Win32 'emulation' is in these files: http://cvs.sourceforge.net/viewcvs.py/luacheia/luacheia/src/libcheia/dirent.c?rev=1.2&view=auto http://cvs.sourceforge.net/viewcvs.py/luacheia/luacheia/src/libcheia/dirent.h?rev=1.2&view=auto This works ok on Linux and Win32, I'm not sure if OSX was tested...The code does need some work to be really usefull, but maybe some finds it usefull already.
If there is interest and maybe some additional platforms contributed, I'd love to do a proper Lua-module from it.
cheers, Martin