[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Basic cross platform module for lua ?
- From: Tomas <tomas@...>
- Date: Sun, 30 Apr 2006 01:00:30 -0300 (BRT)
Something I don't understand is for example why there is os.remove
and os.rename functions but not mkdir, rmdir (which are in
luafilesystem) and copy (can't find this one). Why do I need 3 modules
to handle filesystem (the standard os, luafilesystem and a home made
to have is_file, file_exists, copy, ...) ?
Lua have only what is ANSI C. mkdir and rmdir, for instance,
are not ANSI C.
You could make another library to encapsulate all of
these function if you prefer. Some of them could be implemented above
I think actually it's easy to write cross platform in python (for
example) since there are the cross platform batteries included. But in
lua, because I have to create them myself, and because I only have
linux, my programms can't be that easily ported to others platforms.
I'm searching for those batteries for Lua.
Lua io or os libraries, some could be implemented above LFS. I don't
know exactly what do you mean with unlink? You should check Posix
library and if the functions you need compile on Windows. LFS was made
to achieve that portability for the Kepler Project, but we implemented
only what we needed.
I think you'll have some work putting all together in a
unique library but not too much :-)