Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sample.eng.ohio-state.edu!purdue!haven.umd.edu!ni.umd.edu!ni.umd.edu!zben From: zben@ni.umd.edu (Ben Cranston) Newsgroups: comp.sys.mac.programmer Subject: Re: Standard File and Working directories... Summary: Need to make WD to use OpenResFile/OpenRFPerm Message-ID: <1991Jun27.182325.3166@ni.umd.edu> Date: 27 Jun 91 18:23:25 GMT References: <1991Jun26.084825.9019@dartvax.dartmouth.edu> <54370@apple.Apple.COM> Sender: usenet@ni.umd.edu (USENET News System) Organization: University of Maryland at College Park Lines: 20 In article <54370@apple.Apple.COM> keith@Apple.COM (Keith Rollin) writes: > There are only two reasons for creating working directories: > - If you are launching another application that expects to find its > location by making a GetVol call. > - If you are writing a hack that involves part of the system that > still uses working directories. For example, one person was > patching StdFile and needed to create WD's. Another person > wanted to fake out INIT 31 and needed to create WD's. Before System 7 it was necessary to create a WD if you wanted to open a resource file with the resource manager. Neither the old OpenResFile nor the newer OpenRFPerm routine takes a directory ID. Now that System 7 is here there is an HOpenResFile that is very much like OpenRFPerm with an added DirID parameter. I suspect this was added more for orthagonality and completeness, since the new FSpOpenResFile is clearly the only call a sane programmer would use (well, maybe that's not true -- if you have the filename in a separate buffer why copy it into an FSSpec record...). DE KA3ZDF K