Re: Unmounting an arbitrary volume
Re: Unmounting an arbitrary volume
- Subject: Re: Unmounting an arbitrary volume
- From: Jim Luther <email@hidden>
- Date: Fri, 6 Jul 2007 10:20:13 -0700
On Jul 6, 2007, at 4:11 AM, Dr. Ian Silvester wrote:
Once I have mounted one or more network volumes, I am aware that
each is assigned an FSVolumeRefNum. To unmount, it is this ID I
must pass. Clearly I do not wish to store locally the IDs of all
volumes I've mounted (and indeed I might not have mounted all
available net volumes), so how do I access the system's list of
mounted volumes, and how do I identify a specific volume in order
to obtain it's FSVolumeRefNum in order to unmount it?
FSGetVolumeInfo will iterate over volumes. Pass it successive
integers
in volumeIndex until you get an error back. How you might identify a
volume depends on what you mean by "identify".
I'll know the volume name that I'd like to unmount - I'm guessing
this'll be included in the info returned per volume and I can make a
match on that?
Thanks for the pointer,
Ian
Remember that you can have multiple mounted volumes with the same
name. They will be mounted at different POSIX paths but the File
Manager name can be the same (i.e., two volumes named "foo" could be
mounted at "/Volumes/foo" and "/Volume/foo-1").
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden