Path: utzoo!attcan!uunet!snorkelwacker!usc!cs.utexas.edu!uwm.edu!ogicse!orstcs!mist!boerned From: boerned@mist.cs.orst.edu (Dan Boerner) Newsgroups: comp.sys.mac.programmer Subject: Converting Directory IDs to vRefNums Keywords: File Manager Message-ID: <17110@orstcs.CS.ORST.EDU> Date: 26 Mar 90 17:54:18 GMT Sender: usenet@orstcs.CS.ORST.EDU Reply-To: boerned@mist.CS.ORST.EDU (Dan Boerner) Organization: Oregon State Univ. -- Computer Science Lines: 22 I'm trying to store the location of a user chosen folder. I'm using some apple sample code which puts up a custom SFGetFile dialog and returns a DirID for the folder chosen. My problem is that I want to store the folder's location as a partial pathname (folder name) and vRefNum. Does anyone know how to convert the Dir ID into a vRefNum? I played around with calling PBGetCatInfo with a CInfoPBRec stuffed with ioVRefNum:=aWDPBRec.ioWDVRefNum; {default vol} ioDrDirID:=aDirID; {from apple SFGetFile} ioFDirIndex:= -1; {gives info about dir specified} But the vRefNum I got after the call was always 2, independent of which folder was chosen. By the way the folder name is being returned correctly in ioNamePtr, so I think the call is working to some degree. Any help would be appreciated. ------------------------------------------------------------------------------ | Dan Boerner Master's Student @ Oregon State Universtity | | boerned@mist.CS.ORST.EDU | ------------------------------------------------------------------------------