Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!apple!keith From: keith@Apple.COM (Keith Rollin) Newsgroups: comp.sys.mac.programmer Subject: Re: Standard File and Working directories... Message-ID: <54282@apple.Apple.COM> Date: 24 Jun 91 18:49:57 GMT References: <174023@tiger.oxy.edu> Organization: Apple Computer Inc., Cupertino, CA Lines: 31 In article <174023@tiger.oxy.edu> schorsch@oxy.edu (Brent William Schorsch) writes: >If you have severe allergies to the File Manager skip this posting... > >Glad to see a few die hards still reading this! Anyway, I have some >questions regarding WD's. I have used the File Manager fairly often, >yet still get confused every now and then... > >What I need to do is to take the Global Variables SFSaveDisk and >CurDirStore and turn them into a WDDirID (the same thing that Standard >File would return). You don't want to do this. Rather than taking SFSaveDisk and CurDirStore and turning them into a WD, you want to turn the logic around. Take the WD that is given you by standard file and decompose it to its corresponding dirID and vRefNum. This is done with a simple call to PBGetWDInfo (or just GetWDInfo). The reason why you don't want to create WD's is because the table that maps WD's into their dirID/vRefnum pairs is a fixed size table. If you fill it up, your system crashes. And the table tends to get full because there is no good way to determine which entries can be removed. The system takes care of WD's created by standard file, but any that you create are harder to handle. By eschewing WD's, you avoid these problems. -- ------------------------------------------------------------------------------ Keith Rollin --- Apple Computer, Inc. INTERNET: keith@apple.com UUCP: {decwrl, hoptoad, nsc, sun, amdahl}!apple!keith "But where the senses fail us, reason must step in." - Galileo