Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!apple!lsr From: lsr@Apple.COM (Larry Rosenstein) Newsgroups: comp.sys.mac.system Subject: Re: Alias resolution: right or wrong? Message-ID: <13848@goofy.Apple.COM> Date: 3 Jun 91 18:33:57 GMT References: <48263@bcsaic.UUCP> <1991May31.170319.1179@neon.Stanford.EDU> <13808@goofy.Apple.COM> Organization: Object Based Systems, Apple Computer, Inc. Lines: 43 In article <13808@goofy.Apple.COM> rmh@apple.com (Rick Holzgrafe) writes: > >The canonical "address" of a file is a triplet of >. This is the method of choice (here I'm >guessing! I'm not a guru on this) because folderIDs are unique (forever) According to IM 6, when you create an alias to a file, the system creates a file ID for the file. The file ID will let the alias track the file anywhere on the same volume even if it has changed name. (The file ID is a unique ID for files, in the same way that the dir ID is a unique ID for directories.) The alias does store the information about the name of the target (probably by volume name, dir ID, and filename). If you do Get Info on an alias, it will show the path to the target, based on the information stored in the alias. If you click Find Original, then the alias is resolved and that information may need to be updated. >This is why the original poster (Eric J. Baumgartner, I think) found that >an identically-named *copy* of his original file, kept in the original This is a backup strategy, I believe. If you make an alias to a file named foo, rename foo to bar, and make a new file called foo, then the alias should still refer to the original file (now named bar). >The trouble is that there is *no* way to uniquely identify a file under >all the transformations it can undergo. The original can be renamed, or There is in System 7. File IDs are unique within a volume and seem to track a file regardless of whether it is moved or renamed. It may not work with certain kinds of backup and restores, in the same way the dir IDs may not survive a backup/restore. For replacing files during a save (which is the best technique), there's a special call to swap the file ID for the old and new files. This lets you preserve the file ID even though the actual file is a new one. -- Larry Rosenstein, Apple Computer, Inc. lsr@apple.com (or AppleLink: Rosenstein1)