• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Finding out that a volume is going away before it does
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Finding out that a volume is going away before it does
      • From: Francis Devereux <email@hidden>
    • Re: Finding out that a volume is going away before it does
      • From: email@hidden
  • Prev by Date: Re: Comparing results of @encode
  • Next by Date: Re: Just starting off in obj C
  • Previous by thread: Re: Leaking CGColor objects
  • Next by thread: Re: Finding out that a volume is going away before it does
  • Index(es):
    • Date
    • Thread