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

goran.krampe at bluefish.se goran.krampe at bluefish.se
Fri Apr 23 09:25:05 UTC 2004


Hi!

Ned Konz <ned at bike-nomad.com> wrote:
> These things are all trouble prone.
> 
> Look at the kinds of things we do with filenames:
> 
> * truncate change set names
> * construct sequentially named files
> * copy files between directories
> * construct names for new files
> * construct new directories (Squeaklets, etc.) with fixed names

> * map filenames to file://URLs
> * map file://URLs to filenames

Just wanted to mention I dug into FileURL recently and that class
FileUrl now has a class comment (Yay!) that has a few noteworthy things
at the end. For example - the fact that a file URL *is always absolute*.
It now also works much better.

Things I discovered when doing this:

1. URI and URL are two different things and the RFCs are somewhat
conflicting. :) I only tried to make FileURL as good as I could given
the circumstances. Had some conversations on IRC with Ken on all this,
quite confusing subject given that I looked at RFC2396 first and then
RFC1738 etc. Bah.

2. Mozilla was a good source for inspiration on how to "do the best
thing" regarding malformed file URLs. 

3. I added a bunch of tests to handle a few freaky cases.

regards, Göran



More information about the Squeak-dev mailing list