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

Tim Rowledge tim at sumeru.stanford.edu
Wed Apr 21 21:29:54 UTC 2004


Colin Putney <cputney at wiresong.ca> wrote:

> 
> On Apr 20, 2004, at 1:13 PM, Tim Rowledge wrote:
> 
> > Ignoring for the moment Russell's point about the file naming issue
> > (since file names should be a separate class to filestreams etc anyway)
> > I would suggest that we would benefit from a single FileDirectory class
> > BUT that said class needs a bridge to the actual machine primitives.
> 
> Hear, hear!
> 
> I'd also like to see a FileLocator class that provides a cross-platform 
> reference to a file.
Oh, of course, it should certainly be just as possible to use a bridge
pattern for just about any platform dependent access.
> 
> Ultimately we need to do away with the use of Strings (even if they're 
> file: URLs) to refer to files.
Definitely. I really pisses me off to see code of the form:-
FileStream newFileNamed: 'blah', FileDirectory slash, mysubdirstring,
'wibble.ext'
- especially when mysubdirstring has been assembled with dirseps in it
already. File paths are not strings, it's as simple as that. 


tim
--
Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
BASIC is to computer programming as QWERTY is to typing.  - Seymour Papert



More information about the Squeak-dev mailing list