252u3129@fergvax.unl.edu (Mike Gleason) (11/26/90)
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