lua-users home
lua-l archive

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


	Hi Mildred

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.

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.
You could make another library to encapsulate all of these function if you prefer. Some of them could be implemented above
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 :-)

	Tomas