[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 8-bit unzip utility



On Jun 26, 3:51 pm, Jerry <SNIPawande...@yahoSNIPo.ca> wrote:
> mdj wrote:
>
> [...]
>
> >> It is very handy using the .. notation to move about in a directory
> >> tree, as you know.  It's a shame that the ProDOS (SOS?) designers
> >> didn't provide a way of "trimming" a path as well as extending it.
>
> > Yes, the absence of a 'self' and 'parent' referential entry in each
> > directory makes it impossible to use relative paths, so while CD is a
> > handy addition, you still can't do, for example, BLOAD ../THING
>
> Each subdirectory header contains a parent-pointer, and parent-entry number,
> so it would be possible to walk back up the pathname toward the root.
> ProDOS' prefix would also make it possible to implement ".." using a string
> truncation.

It would be theoretically possible to intercept all MLI calls that
supply a path using the ProDOS Filing Interface, and perform the
necessary truncations. The hard part would be ensuring the PREFIX
remained intact at the completion of the call, that part would require
a hack or two.

The nice thing about Unix, is that ".." and "." actually exist as
directory entries, so no cleverness is ever required and ../foo is
evaluated just like any other path.

Unfortunately the 'simple' solution of just adding those entries to
each directory with a hack of the CREATE call would undoubtedly send
most file utilities into a fit.

Matt