Filename (was Re: [BUG] FileDirectory>>exists)

Ned Konz ned at bike-nomad.com
Thu May 22 01:50:19 UTC 2003


On Wednesday 21 May 2003 05:25 pm, Julian Fitzell wrote:
> I posted something about this a few weeks ago.  I think we should
> look at having File class, rather than a Filename (unless we
> perhaps want both).  The File class would obviously know the name
> of the file it represented and would be able to provide you with a
> stream on that file. It could also provide operations to rename the
> file, etc.  Haven't thought too much about the details or possible
> issues, but it seems to me like a good idea on the surface, anyway.

But filenames aren't something that files have. They're something that 
is maintained by something else that's keeping a set of name 
bindings.

I can get to the same file by multiple names, even in the same image 
(via links, mounts, or other mappings).

And of course we can have streams whose names we don't know (stdin, 
stdout, pipes...).

We need Filename operations to make it possible to talk about files 
that don't or won't exist. Before you create a file, you've still got 
to deal with its name.

Plus, we've got to be able to do cross-platform name operations of 
some sort. I ran into some problems with the ZipArchive, since it 
stores its paths in a standard format that then must be translated to 
local filenames.

There were suggestions about unifying Filename and file:// URL 
handling at some point.

-- 
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE



More information about the Squeak-dev mailing list