Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!sharkey!cfctech!ttardis!rlw From: rlw@ttardis.UUCP (Ron Wilson) Newsgroups: comp.sys.apple Subject: Re: Prodos symbolic Linkes (was Re: Matt D. / MAC FST) Message-ID: <2468@ttardis.UUCP> Date: 10 Feb 90 16:44:43 GMT Organization: Gallifrey Lines: 50 In article <13033@fs2.NISC.SRI.COM>, cwilson@NISC.SRI.COM (Chan Wilson) writes: >In article <38482@apple.Apple.COM> farrier@Apple.COM (Cary Farrier) writes: >>In article <2463@ttardis.UUCP> rlw@ttardis.UUCP (Ron Wilson) writes: >>>A symbolic link is a directory entry that either: >>> a) contains the path name of the target file >>>or b) points to a file with one data block, which, in turn, contains >>> the pathname of the target file >>> >>>Method b could easily be implemented on ProDOS and GS/OS. Method a would >[snip] >>Option B would require an FST to implement this, and is not as easy as you >>might think. >> >>The thing that really makes soft links useable is that under UNIX you >>don't swap disks at your leisure. Under GS/OS, you would have to either >>limit soft links to the same volume, or you would end up doing alot of >>disk swapping if you don't have a hard drive (or multiple hds). They >>are a nice idea, but IMHO probably not worth the time to implement. > >Hmm, I can think of a fairly easy way to make soft symbolic links. >Make two more storage types, a type 6 and type 7 for argument sake. >Type 6 would be a file that would have symbolic links attached to it; >type 7 would be files that are linked to type 6. This is a nice, simple >way to do it, since existing utilities would leave these types of files >alone. It'd probably make things simpler if you devoted two more for type >5 files (data/resource files). > >Now, this is just casual thinking. On deeper thought, one realizes >that you need to keep track of which files are linked to the master >file, so you'd need a header block like type 5 files. This way, you >can either delete all associated files (type 7) when you delete the >master file (type 6), or you can change the storage type when all >links are gone (back to existing type). >--Chan On Un*x system that have symbolic links, there is no special bookkeeping done. If the target of a symbolic link is deleted or is on a disk that is not currently mounted, the system simply says it that it can't open the file. In fact, many systems allow you to create the symbolic link even if the target file doesn't exist or if the target file's disk is not mounted. ALL of these systems permit you to delete the target file (indeed they don't even tell that there are any symbolic links). Many people may wonder why any one would actually design something that works this way. The reason is that symbolic links are inteded to only be a way of conveniently storing aliases for files in the file system. This may seem "lame," but having been a Un*x user and programmer for many years, I've come to appriciate both the convenience and space saving possiblities of this feature (and also "hardlinks" - but they really aren't ammenable to GS/OS or ProDOS).