Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!ucdavis!iris!lim From: lim@iris.ucdavis.edu (Lloyd Lim) Newsgroups: comp.sys.mac.programmer Subject: file info from rsrc handle? Message-ID: <3687@ucdavis.ucdavis.edu> Date: 17 Feb 89 08:24:03 GMT Sender: uucp@ucdavis.ucdavis.edu Reply-To: lim@iris.ucdavis.edu (Lloyd Lim) Distribution: usa Organization: U.C. Davis - Department of Electrical Engineering and Computer Science Lines: 28 I realize this a rather basic question, but I never ventured into this area before. Please bear with me. I need to get information about a file (using PBGetFInfo) given a handle to a resource in that file. OK, so I do a HomeResFile which gives me the path reference number, then a GetVRefNum which gives me the volume reference number. Then I get stuck. PBGetFInfo likes file names or directory indexes. So I suppose I have to go through the indexes until I hit the correct file. But how do I know when it hits the correct file? The only thing I have is the path reference number to compare against the one that's returned. But the call only returns the first path it finds. So I guess I have to go through the FCB chain to find the file number to compare against the file number returned by PBGetFInfo. Do I really have to do all this or am I missing something? I realize that with HFS I could do a PBGetFCBInfo to get the file name and simply do a PBGetFInfo. However, I would also like this to work on 64K ROMS. If I really have to do what I outlined above then I might just forget about the old ROMS. My God! What did I just say! I started with an original 128K upgraded to 512K upgraded to 512KE upgraded to Plus. Someone, say it ain't so hard! +++ Lloyd Lim Internet: lim@iris.ucdavis.edu Compuserve: 72647,660 US Mail: 146 Lysle Leach Hall, U.C. Davis, Davis, CA 95616