Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!well!gurgle From: gurgle@well.sf.ca.us (Pete Gontier) Newsgroups: comp.sys.mac.programmer Subject: Re: The Beauty of HFS Message-ID: <22993@well.sf.ca.us> Date: 4 Feb 91 18:39:44 GMT References: <1991Jan29.074646.7218@actrix.gen.nz> <1991Jan29.174321.19621@santra.uucp> <48627@apple.Apple.COM> Organization: cellular Lines: 27 In article <48627@apple.Apple.COM> heksterb@Apple.COM (Ben Hekster) writes: >I'd think we can safely assume the working directory reference number will >remain valid while the application is running... but again, if you were >really worried about it, why not convert the working directory reference >numbers and forget about them altogether? Nope, working directories certainly don't stick around. In most cases, they stick around just long enough for you to use them once reliably, i.e. opening a fork in response to Standard File or SetVol to a directory via a WD. Otherwise, there's no telling when they'll drop out from under you. I usually assume that a call the GNE/WNE means they've become invalid, unless you've done something like open a file access path or SetVol to them. I've been bitten by this once, and it bit a friend of mine whose application started crashing when the ci came out; he traced the problem to an invalid WD using MasBug but no longer worked for the company and so had no way to fix it. As far as System 7 goes, I don't know. There is a new explanation of the way all these various file system identifiers work in the File Manager chapter of Inside Mac VI, and although the WD is still explained, it is described in the context of providing compatibility between HFS and MFS, and I don't know if its presence in the volume is an indication of continued support from Apple or if its description suggests that it may go away some time in the future. -- Pete Gontier, gurgle@well.sf.ca.us Software Imagineer, Kiwi Software, Inc.