Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!mp.cs.niu.edu!ux1.cso.uiuc.edu!pequod.cso.uiuc.edu!dorner From: dorner@pequod.cso.uiuc.edu (Steve Dorner) Newsgroups: comp.sys.mac.programmer Subject: Re: Standard File and Working directories... Message-ID: <1991Jun24.153452.10440@ux1.cso.uiuc.edu> Date: 24 Jun 91 15:34:52 GMT References: <174023@tiger.oxy.edu> Sender: usenet@ux1.cso.uiuc.edu (News) Organization: University of Illinois at U-C Lines: 27 In article <174023@tiger.oxy.edu> schorsch@oxy.edu (Brent William Schorsch) writes: >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). PBOpenWD. >The next thing, is once I get a WDDirID, can I just use it as though >SFGetFile returned it to me, or will the working directory need to >be opened before I cal SetVol(0, theWDDirID)? Or anything else? Just use it. Better yet, don't use it; the only time to use a WD is if you are calling something (to which you don't have source) that requires a WD. A volume reference number and directory id pair are a far better choice; you don't have to worry about closing them, or the system running out of them if you fail to close them. >If this is the case how does Standard File do it (that is return the ID >of an OPEN WD without the guarantee that it will later be able to close it?) All WD's are open. Standard File is getting help from the system when your program exits, I believe. -- Steve Dorner, U of Illinois Computing Services Office Internet: s-dorner@uiuc.edu UUCP: uunet!uiucuxc!uiuc.edu!s-dorner