lua-users home
lua-l archive

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


Hi Mildred,
I am intermittently working on the same issue.
I posted some of my views on this in recent threads.

The issues I have are :
1) ansi io functions that are not in liolib.c
2) loslib.c and liolib.c

The os. functions that exist are the ANSI C defined
functions, not ANSI and Lua does not implement it.

Lua needs a set of standardized set of OS functions for
cross platform filesystem operations etc. Issue 1.

Issue 2 is the IO library, for which life gets a bit more
complex. However, I am not too far from a solution and
I will post when completed.

DB

On 4/30/06, Mildred <ml.mildred593@online.fr> wrote:
Hi,

I'm searching for a lua module that would be cross platform for the
main desktop OS that would provide all basic functions that I need
without the the neeed to require some others modules.
Does something like that exists or do I have to create it ?

Something that would implement
- all filesystem functions (like file_exists, is_dir, is_file,
file_type, mkdir_recursive, mdir_recursive, unlink, rmdir and some
others)
- some way to communicate between programms (I know there are
fifos on unix but what about Windows ?) and to fork even on Windows
- all input/output functions, bufferized or not.
- an exception system for lua (I already have my module for that :)

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, ...) ?

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.

--
Mildred       <xmpp:mildred@jabber.fr> <http://mildred632.free.fr/>
Clef GPG :    <hkp://pgp.mit.edu> ou <http://mildred632.free.fr/gpg_key>
Fingerprint : 197C A7E6 645B 4299 6D37 684B 6F9D A8D6 [9A7D 2E2B]