FileDirectory>>fileExists: (was: Re: [BUG]Unable to load BFAV, various problems )

Doug Way dway at mailcan.com
Thu Apr 22 20:57:42 UTC 2004


Colin Putney wrote:

> I guess File would be OK, but I don't like FileName. It's not a name, 
> it's more like a pointer to the file. It should implement #exists and 
> #create.


I basically agree; I like File better than FileName.  FileLocator seems 
a bit too... wordy to me.

VisualWorks has a roughly equivalent class called Filename.  (Last I 
used VW several years ago, anyway.)

>> (And the idea of having a single FileName class which maps to the 
>> appropriate platform primitives sounds fine to me, rather than having 
>> UnixFileName/Win32FileName/MacFileName/etc subclasses.)
>
>
> I'll take Tim's side here. I'd like to see File be completely 
> cross-platform, and deal with a Peer (or Bridge as Tim called it) 
> rather than calling primitives directly. So we'd have UnixFilePeer, 
> Win32FilePeer, CarbonFilePeer, AcornFilePeer etc.


Ah right, the peer/bridge thing.  Yeah, something like that sounds 
fine... I had glossed over what you and Tim were proposing.  But I was 
agreeing with the idea that the File class should be cross-platform, and 
not have direct subclasses.

Anyway my main point was that I didn't think a URL/URI implementation 
would work for what we want to do.

- Doug





More information about the Squeak-dev mailing list