Re: What's the weirdest filesystem out there?



Peter Ammon wrote:
> Ian Pilcher wrote:
> > Asking here, because I can't think of a more appropriate place...
> >
> >
> > Background:
> >
> > I'm working on code which needs to break the pathname in a Java File
> > object into its component parts:
> >
> > 1. An optional filesystem identifier (such as a drive letter).
> > 2. An optional root directory.
> > 3. Zero or more subdirectories.
> > 4. An optional filename.
> >
> > Depending on the platform and filesystem, 1 and 2 may or may not be
> > separable.
> >
> >
> > Question:
> >
> > Is there any platform out there that uses something than its directory
> > separator to signify a root directory? (To put it another way, what's
> > the weirdest hierarchical filesystem out there?)
> >
> > TIA
> >
>
> It's been a long time since I've done any Mac Toolbox programming, but
> if I remember correctly, the Mac Toolbox only enforces unique pathnames
> within a single volume, and distinguishes volumes by their volume ID.

The direct relevance of this to the OP's question is that in the
'classic' MacOS there is no 'root' - or rather, each volume is a
separate root. In OS X, a traditional UNIX organisation applies, and
individual volumes are mounted under /Volumes.

> That is, you can have multiple volumes with the same name, and so you
> can have multiple files with the same volume name and path.

Indeed - but of course you then have to access them by means other than
the path - such as directory ID+name.

The older MFS, which shipped on the first Macs and was necessarily
superseded by HFS when mass storage devices such as Apple's HD20 became
available, was a flat filing system that 'faked' the directory
structure. I imagine it consequentially had difficulties with two files
of the same name on a single volume, although volumes were always
distinguished by 'refnum'.

> Which, if
> you think about it, makes some sense - you don't want the computer to
> rename a floppy just because you're connected to a network share with
> the same name.
>
> -Peter
>
> --
> Pull out a splinter to reply.

.