Path: utzoo!news-server.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!hoptoad!tim From: tim@hoptoad.uucp (Tim Maroney) Newsgroups: comp.sys.mac.programmer Subject: Re: Finding vRefNum of my current directory Message-ID: <15955@hoptoad.uucp> Date: 8 Mar 91 19:39:19 GMT References: <1991Mar4.012719.6329@uvm.edu> Reply-To: tim@hoptoad.UUCP (Tim Maroney) Organization: Electronics for Imaging, San Bruno CA Lines: 20 In article <1991Mar4.012719.6329@uvm.edu> tan@emily.uvm.edu ( get a tan) writes: > I am presently working on a Mac program in which I need to find the vRefNum >of my current directory/folder. I can't seem to figure out how to get this >without knowing the folder name, or how to get the folder name without >the vRefNum. Am I missing something in the ToolBox reference manuals? >Any help would be greatly appreciated! Ah, the price of multitasking.... There are really two current directories. The Standard File current directory is specified by the SFSaveDisk/CurDirStore pair. The file system current directory is given by GetVol. Do a GetVol; this will give you a working directory reference number. If this is all you need, fine. If you need to decompose it into a volume reference number and a directory id, then use PBGetWDInfo, as I just described to another poster. -- Tim Maroney, Mac Software Consultant, sun!hoptoad!tim, tim@toad.com "The above opinions and suggestions have absolutely nothing to do with the little fat man putting crisp $100 bills in my pocket." -- Alan Vymetalik