tan@emily.uvm.edu ( get a tan) (03/04/91)
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.... Thanx in advance Chris Tan
tim@hoptoad.uucp (Tim Maroney) (03/09/91)
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