[BUG] String asURL fails

Michael Rueger m.rueger at acm.org
Thu Mar 7 20:19:05 UTC 2002


Stephen Pair wrote:

> Right...yet another reason to have a FileName class heirarchy for this
> stuff.  FileDirectories would *be* the directory, and thus the specific
> subclass would only be useful on the platform they are designed for.  Of
> course, if this were the case, we may find that only one FileDirectory
> class is needed, since the primitive interface should be the same for
> all platforms.

I've spent quite some time (on and off (more off than on though :-( )
for the last couple of months) rewriting the directory and file handling
stuff. I've been through a couple of versions and finally decided to try
a rather radical approach by normalizing everything to URIs. So, within
Squeak you will always deal with URIs and only have to convert those
while crossing over to file system or remote server functions.
At these points you always will know where a filename came from and can
parse it according to the current platform's conventions. E.g., Mac
filenames containing a / would be escaped according to the URI
conventions.
Most of the time is actually spent on figuring out all the "creative"
uses of paths and FileDirectory.
Scary stuff... ;-)

Michael



More information about the Squeak-dev mailing list