[comp.sys.apple2] File Linking

greg@hoss.unl.edu (Hammer) (09/06/90)

I remember reading a discussion about linking files, and it was I guess
dismissed since there was no easy way to implement the equivalent of
inodes with the current structure of ProDOS, so that deleting a file with
a second link won't deallocate the file.

I don't care about that.

All I want is a command which will create a link (say, LINK) and one which
will remove a link (say, UNLINK).  LINK would just create a directory
entry equivalent to the original directory entry, and thus point to the
same file.  (This can be done I believe, since I was able to make a
subdirectory that contained itself with block editing.)  UNLINK would just
remove the directory entry, NOT deallocate the file.  This requires that
the user know which files have multiple links.  (Helpful option would be a
that LINK allocates the file again, just in case a DELETE was done when an
UNLINK should have.  LINK creates the directory entry, and re-allocates
the file.  Then it can be UNLINKed and the file is left as allocated.)

So, has this been written?  I'd write it myself, but I'm not that familiar
with ProDOS MLI calls.  If it hasn't, it does sound rather painless for
the programmer, just for the user.  The user should be able to keep track
of the files... say a .l on files that are links.  (Of course any one can
be taken as the real file.)

With this, a user could do a simple move from BASIC.SYSTEM with LINK
<oldpathname> <newpathname> and UNLINK <oldpathname>.

--
     __  _____________  __
     \ \_\ \__   __/ /_/ /
      \greg@hoss.unl.edu/
       \_\ \_\|_|/_/ /_/   Just call me "Hammer."