Any good ideas for FileNames? (was Re: [BUG]FileList[2]>directory: oddity)

Brian T Rice water at tunes.org
Tue Dec 2 06:14:37 UTC 2003


On Mon, 1 Dec 2003, Ned Konz wrote:

> I started rewriting the file name stuff and got sidetracked, but ran into that
> same conclusion.
>
> I figured that it was about time to get rid of the assumption that there is
> only one kind of FileDirectory in a given Squeak image.
>
> Why can't I talk about a DosFileDirectory in a Unix Squeak?
>
> Anyway, does anyone know of a good, clean way to deal with filenames across
> platforms?
>
> I looked at Java and Perl; neither one of them impressed me much.
>
> At OOPSLA we talked about the idea of representing filenames internally as
> file:// URLs, and translating them to and from the native format as needed
> (for the VMs and perhaps for display to the user).
>
> Some file systems (like Windows and Amiga) have the concept of (logical or
> physical) volumes, others (like Unix) try to hide the volumes.
>
> Most of the file systems I know of are hierarchical, and would probably map
> well to a hierarchical URL scheme.
>
> Ideas?

Lisp's ANSI standard, X3J13, defines some interesting structured pathname
concepts: http://www.lisp.org/HyperSpec/Body/sec_19-2.html

Unfortunately, it's rather dense, even if it does include concepts like
file system versioning and lots of portability options. I checked on Dylan
manuals to see if it had been carried over in some more sensible form, but
had no luck even finding the pathname references.

None of this, unfortunately, gives you a good idea on design of an
implementation for Smalltalk. In Slate, I'm tending towards defining
system-description objects and having filename type specializations that
are attributes of these, and have part of this implemented already with
the structured-object pathname idea. Craig's Flow also has Locator objects
with a HierarchicalLocator type which is close in this way, and I'm also
developing this idea further.

I should mention that the Lisp specification also tries to define logical
pathnames, where abstract portable pathname component designators could be
combined with simple filenames to have programs with modular
configurations for storing their files on different platforms. This was a
noble effort, but not enough work/time was put into it, so the spec's
paragraphs in this area are very confused and almost not worth looking at.
(They're in a separate of the same chapter I linked to above.)

-- 
Brian T. Rice
LOGOS Research and Development
http://tunes.org/~water/



More information about the Squeak-dev mailing list