Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!lsr From: lsr@Apple.COM (Larry Rosenstein) Newsgroups: comp.sys.mac.programmer Subject: Re: Standard File and Working directories... Message-ID: <14312@goofy.Apple.COM> Date: 28 Jun 91 21:31:00 GMT References: <1991Jun26.084825.9019@dartvax.dartmouth.edu> Organization: Object Based Systems, Apple Computer, Inc. Lines: 24 In article <1991Jun26.084825.9019@dartvax.dartmouth.edu> llama@eleazar.dartmouth.edu (Joe Francis) writes: >They high level HFS call HOpen, (TN 218, IM VI) takes a Dir ID directly. >The tech note indicates that the call is provided in glue for MPW 3.0+, >so presumeably it will work with any HFS system. HOpen calls PBHOpen which takes a (true) volume refnum, dirID, and name and opens the file. You can call PBHOpen directly if desired. This stuff is documented in Inside Mac 4. Opening a resource file given a volume refnum, dirID, and name is trickier. MPW does have glue code for HOpenResFile, which does this (I think). The 3.2 glue code calls System 7 HOpenResFile if it exists. Otherwise it uses HSetVol to set the current directory and calls OpenRFPerm. (The glue code seems to be careful about how it restored the current directory, to avoid the problems HSetVol can cause.) Neither case creates a working directory. -- Larry Rosenstein, Apple Computer, Inc. lsr@apple.com (or AppleLink: Rosenstein1)