• 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
Re: Finding out that a volume is going away before it does
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finding out that a volume is going away before it does


  • Subject: Re: Finding out that a volume is going away before it does
  • From: email@hidden
  • Date: Mon, 27 Oct 2008 09:37:04 +0100


On 26 Oct 2008, at 17:37, Gregory Weston wrote:

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

It look to me like registering for kEventClassVolume / kEventVolumeUnmounted carbon events would do what you need. This will tell you the cRefNum of the unmounted volume (once again though after it had gone).


Matt Gough


* kEventClassVolume / kEventVolumeUnmounted * * Summary: * An existing volume has been unmounted (or media ejected). * * Discussion: * This event is sent to all handlers registered for it. * * Mac OS X threading: * Not thread safe * * Parameters: * * --> kEventParamDirectObject (in, typeFSVolumeRefNum) * The volume refnum of the volume that was unmounted. At the * point when this event is sent, this is no longer a valid * volume refnum, and cannot be passed to any File Manager * API; it is useful only for comparison with cached volume * refnums in your own data structures. * * Availability: * Mac OS X: in version 10.0 and later in Carbon.framework * CarbonLib: in CarbonLib 1.3.1 and later */ enum { kEventVolumeUnmounted = 2

_______________________________________________

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: Gregory Weston <email@hidden>
References: 
 >Finding out that a volume is going away before it does (From: Gregory Weston <email@hidden>)

  • Prev by Date: Re: Comparing results of @encode
  • Next by Date: Bind button title to Boolean
  • Previous by thread: Finding out that a volume is going away before it does
  • Next by thread: Re: Finding out that a volume is going away before it does
  • Index(es):
    • Date
    • Thread