[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: It works!
- From: Rob Kendrick <lua-l@...>
- Date: Sun, 8 Aug 2004 01:26:03 +0100
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.
--
Rob Kendrick, Pepperfish Ltd. +44 (0)845 226 4146 www.pepperfish.net
PGP signed or encrypted mail welcome Key ID: 3651D17A