[comp.sys.mac.programmer] More File Manager Help

lasky@iris.ucdavis.EDU (Ty Lasky) (01/17/91)

Thanks to all of you who responded to my queries on how to find out the
working directory ID for the current default volume. Your tips on using
GetWDInfo, and Tech Note 218 were most helpful.

Now, I have a related question. Once I have a volume name, a file name,
and a working directory ID, I assume from what I have read in Inside
Macintosh, that I have a fairly permanent full specification of a
file/directory/volume.

With these three items, how do I set the default volume/directory to
that specified by my volume name and working directory ID, so I can open
the file? I don't think I can just use SetVol, as that requires a volume
or working directory reference number, which is different from the
working directory ID (correct?). I am working under the assumption that
both the volume and working directory reference numbers will not be the
same after rebooting the machine, but the working directory ID will be.
So, when I start an application, I would like to use the volume name and
the working directory ID to set the default volume, but I don't know the
appropriate toolbox call(s) to do this. I know there is a call by the
name of OpenWD, but this seems to require that you know the volume
reference number in advance.

Any help with this?

Please respond by e-mail, and I will summarize to the group.

Thanks,

Ty A. Lasky

lasky@iris.ucdavis.edu

mxmora@unix.SRI.COM (Matt Mora) (01/18/91)

In article <48197@apple.Apple.COM> keith@Apple.COM (Keith Rollin) writes:
>
>There were a couple of mistaken notions in the following e-mail that
>I felt were important to respond to. These are common mistakes, due
>mostly because of the confusing nature of Inside Mac. Ty starts off

Keith,

What an excellent explanation of dirid and working directory refnums.
They (Apple tech pubs group) should have you help write the IM.
As if you aren't busy enough :-)

Thanks for the explanation.

Matt

>------------------------------------------------------------------------------
>Keith Rollin  ---  Apple Computer, Inc.  ---  Developer Technical Support





-- 
___________________________________________________________
Matthew Mora                |  my Mac  Matt_Mora@QM.SRI.COM
SRI International           |  my SUN   mxmora@unix.sri.com
___________________________________________________________