Re: Unmounting an arbitrary volume
Re: Unmounting an arbitrary volume
- Subject: Re: Unmounting an arbitrary volume
- From: Quinn <email@hidden>
- Date: Fri, 6 Jul 2007 13:09:17 +0100
At 12:11 +0100 6/7/07, Dr. Ian Silvester wrote:
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?
Yes. The prototype for FSGetVolumeInfo is:
extern OSErr FSGetVolumeInfo(
FSVolumeRefNum volume,
ItemCount volumeIndex,
FSVolumeRefNum * actualVolume,
FSVolumeInfoBitmap whichInfo,
FSVolumeInfo * info,
HFSUniStr255 * volumeName,
FSRef * rootDirectory
);
You pass in the address of a HFSUniStr255, which it fills out.
That's a structure containing an array of UTF-16 values. You can
build a NSString/CFString from that and then do whatever comparisons
you need.
S+E
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
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