Cross-platform path specification (was RE: Access directory
relatively)
Dan Ingalls
Dan at SqueakLand.org
Wed Aug 7 03:45:47 UTC 2002
>On Tue, 6 Aug 2002 15:25:05 -0700, Dan Ingalls <Dan at SqueakLand.org> wrote:
>
>> 2. What about declaring some character (% or something else) to be the Squeak path delimiter in file names, so that it gets translated to the right thing for each platform. I guess this would be like a poor man's file name class. Anyway, it would let you use normal string concatenation without having to invent something new, and it could be used in conjunction with % as either the special delimiter, or a special concatenator or both.
>
>I don't understand why this is even an issue -- we have a world-wide,
>platform-neutral standard already -- the URL.
>
>If we're going to change a bunch of stuff to support this, why don't we
>just do it right and use a URL?
Yes, I think I agree with Jon.
And if we need a shorthand for making it easy to build up URLs, maybe % could be a useful selector that wouldn't overload comma.
dir := FileDirectory path: 'foo' % 'bar' % 'baz'.
or
dir := FileDirectory url: 'foo' % 'bar' % 'baz'.
- Dan
More information about the Squeak-dev
mailing list
|