Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!sun-barr!apple!usc!zaphod.mps.ohio-state.edu!maverick.ksu.ksu.edu!hoss!fergvax!252u3129 From: 252u3129@fergvax.unl.edu (Mike Gleason) Newsgroups: comp.sys.mac.programmer Subject: File Manager Problem Message-ID: <1990Nov26.073834.9278@hoss.unl.edu> Date: 26 Nov 90 07:38:34 GMT Sender: news@hoss.unl.edu (Network News Administer) Organization: University of Nebraska - Lincoln Lines: 22 Would some kind soul please tell me the correct way to open a file using the hierarchial file system routines. Situation: I can use code from Sample Code Notes telling me how to cycle through directories using CInfoPBRecs and PBHGetCatInfo, so I have a list with filenames, dirIDs, and vRefNums. HOW do you use HOpen to open a file knowing such information. Intuition tells me to try: err = HOpen(vrefnum, dirid, filename, fsRdPerm, &refnum); But it refuses to work. I have a feeling that I'm not using the correct info from the CinfoPBRec as I get each file's information. Right now, I store the contents of myCPB.ioNamePtr in the filename, myCPB.ioVRefNum in the vrefnum, and myCPB.ioDirID in dirid. I have also tried substituting myCPB.ioFlParID as the dirid, but nothing works! Why??? What do I need from the CInfoPBRec to open a file? Am I going to have to HSetVol and then use regular FSOpen()? mike gleason "How I've waited for you to come 252u3129@fergvax.unl.edu I've been here all alone Now that you've arrived, please stay awhile And I promise not to keep you long... I'll keep you forever" -- Slayer