lua-users home
lua-l archive

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


(Slowly making my way through the 300+ messages written since my two week holidays...)

Rob Kendrick wrote:
On Sun, Aug 08, 2004 at 01:16:52AM +0000, David Given wrote:

Alex Sandro Queiroz e Silva wrote:
[...]

Just one thing, though. Can I suggest that Lua *must* provide a directory listing function as part of its core functionality?

You don't have to go back further than a week in the archives to read about this... :-)

The short summary is that you can't, because there's no standard way of doing it that's truly portable across all platforms. And, 'all platforms' includes weird and wacky embedded systems that don't support any IO.

Let me put it like this: do you use /, \, :, . or <other> to seperate path elements?

And even more excitingly, do you use / or $ as the root directory, or ..
or ^ to go up a level? :)  (RISC OS must have the most bizarre paths
I've ever personally seen.  ADFS::HardDisc4.$.Applications.!Zap for
example)

There's a reason the ANSI C library distances itself from directory
structures.

If I recall correctly, Bull's Mini6 I used in my student years used something like GCOS6 or 7, where directory separators were < or >, depending if you were going up or down in the hierarchy...
Can't recall much more details, so don't ask! ;-)

--
Philippe Lhoste
--  (near) Paris -- France
--  Professional programmer and amateur artist
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --