[FIX] some FileURL fixes (was Re: While I'm at it...(Re: [BUG]?FileDirectory>>directoryContentsFor:))

Ned Konz ned at bike-nomad.com
Mon Mar 19 18:56:01 UTC 2001


On Monday 19 March 2001 10:39, Lex Spoon wrote:
> Bert Freudenberg <bert at isg.cs.uni-magdeburg.de> wrote:> >
>
> > > The problem with pathForFile is that you have to know the base.
> > >
> > > And some operating systems (Windows/CE, for instance) don't have the
> > > concept of a "current directory", so you can't use that, in general.
> >
> > Wouldn't it make sense to use "FileDir default" as base?
>
> Ned, your changeset looks excellent.
>
> I think FileDirectory default would be good for *relative* file names.
> For absolute ones, why not have a "FileDirectory root"?

There are some OS's where absolute filenames aren't rooted anywhere... 
Windows 9x/DOS comes to mind, with its drive ID's (filenames like 
c:\windows\win.ini). NT has a rooted file hierarchy, but also allows the old 
DOS-like drive letters for compatibility (and does a translation internally). 
The Mac and Amiga also have volume names; don't know if there's a logical 
root for these.

> Incidentally, if you take the above approach, then #pathForFile can be
> written to use FileDirectory>>directoryNamed:....
>
> -Lex

-- 
Ned Konz
currently: Stanwood, WA
email:     ned at bike-nomad.com
homepage:  http://bike-nomad.com





More information about the Squeak-dev mailing list