Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!apple!keith From: keith@Apple.COM (Keith Rollin) Newsgroups: comp.sys.mac.programmer Subject: Re: Getting the full pathname? Message-ID: <35671@apple.Apple.COM> Date: 16 Oct 89 02:18:52 GMT References: <850zebolskyd@yvax.byu.edu> <111@crucible.UUCP> Organization: Apple Computer Inc, Cupertino, CA Lines: 26 In article <111@crucible.UUCP> al@crucible.UUCP (Al Evans) writes: >In article <850zebolskyd@yvax.byu.edu> zebolskyd@yvax.byu.edu writes: > >>If you want the _user_ to be able to see the pathname (and find their way to >>the file) you can use PBGetWDInfo to get the dirID from your working >>directory, then PBGetCatInfo to get that directory's parent's dirID, and >>so on until to get to dirID=2, which will be the root. You get the names > ^^^^^^^ > Although this seems to be true, it doesn't seem to be documented :-( This *IS* documented. Check out the top of page 92 of Inside Mac IV. In add- ition, this is the technique used in Technote #238 and DTS Sample Code #18: Standard File. Finally, there is a constant defined in the MPW headers (fsRtDirID) that identifies the root as 2. On the other hand, I, too, have a hard time relying on this bit of information. Your alternate technique may have merit; I'll have to take a look at it. I'd probably base my exit condition on a specific error rather than just any old error, but so far it looks pretty good. -- ------------------------------------------------------------------------------ Keith Rollin --- Apple Computer, Inc. --- Developer Technical Support INTERNET: keith@apple.com UUCP: {decwrl, hoptoad, nsc, sun, amdahl}!apple!keith "Argue for your Apple, and sure enough, it's yours" - Keith Rollin, Contusions