FileDirectory>>fileExists: (was: Re: [BUG]Unable to load BFAV,
various problems )
cputney at wiresong.ca
Tue Apr 20 19:39:16 UTC 2004
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.
I'd also like to see a FileLocator class that provides a cross-platform
reference to a file. It would implement a protocol for dealing with
files - #open, #delete, #moveTo: etc, and delegate the actual
operations to a platform-specific bridge. The bridge would resolve the
abstract file reference in terms appropriate to the platform API and
filesystem - paths in Unix, volume and file references on Mac/HFS, and
whatever is appropriate for Windows and RISC.
Ultimately we need to do away with the use of Strings (even if they're
file: URLs) to refer to files. I've noticed that we're starting to use
files more than we used to - SM logs and caches, MC repositories etc.
and it would be nice to be able to move images and their associated
files between platforms without having to fix up the file paths each
time. I run into this a lot when switching between the Unix and Carbon
VMs on the same OS X machine.
More information about the Squeak-dev