Finding out that a volume is going away before it does
Finding out that a volume is going away before it does
- Subject: Finding out that a volume is going away before it does
- From: Gregory Weston <email@hidden>
- Date: Sun, 26 Oct 2008 12:37:52 -0400
Amusingly, when you register an unmount or eject approval function
with DiskArbitration, that function gets invoked *after* NSWorkspace
sends its didUnmount notification. How's that for a lead-in anecdote?
So anyway, I'm looking to react to the imminent or even potential
departure of a volume. Some way I can know that a volume will (or
probably will) be taken away from me in the near future but with
enough lead time that I can reliably make one or two quick function
calls against it. Any thoughts? I'm not worried about abrupt
disconnects like the user yanking the cable on an external drive.
Just looking for the tiniest smidgen of warning for orderly unmounts.
Specifically, I'm looking for the opportunity to call
FSGetCatalogInfo on the mount point and then FSGetVolumeInfo on the
volume reference number I got back from the first call.
Greg
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden