• 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: NSWorkspace and unmounting USB drives
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSWorkspace and unmounting USB drives


  • Subject: Re: NSWorkspace and unmounting USB drives
  • From: "Herb Petschauer" <email@hidden>
  • Date: Fri, 11 May 2007 12:06:33 -0700

FSUnmountVolumeSync() is deprecated?  Not in my Files.h header file...

On 11/05/07, Buddy Kurz <email@hidden> wrote:

That works from the command line - I guess I could run diskutil in an NSTask as a last resort but I was hoping for something that felt a little less funky. Too bad there isn't an NSDiskutil class...

I can't imagine that the Finder runs diskutil - Carbon unmount
functions are deprecated - I'm not sure where else to look.

Thanks for the suggestion.


On May 11, 2007, at 11:07 AM, Shawn Erickson wrote:

> On 5/11/07, Buddy Kurz <email@hidden> wrote:
>> I would like to be able to unmount a USB drive after copying data
>> to it.
>>
>> When the drive is plugged in, NSWorkspace notifies my app. The device
>> path is "/Volumes/LaCie-Disk"
>> When I use [ws getFileSystemInfoForPath:devicePath ...] ,the volume
>> is writable but not unmountable.
>> [ws unmountAndEjectDeviceAtPath:devicePath] fails - not surprisingly
>> since the device appears to not be unmountable.
>
> ...maybe use diskutil?
>
> [0:509] > diskutil unmountDisk
> Disk Utility Tool
> Usage:  diskutil [mount(Disk)|unmount(Disk)|eject] <force>
>        [Mount Point|Disk Identifier|Device Node]
> Mount, unmount or eject local disks or volumes.
> force is only valid on unmount or unmountDisk.
> Example:  diskutil unmount /Volumes/SomeDisk

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


References: 
 >NSWorkspace and unmounting USB drives (From: Buddy Kurz <email@hidden>)
 >Re: NSWorkspace and unmounting USB drives (From: "Shawn Erickson" <email@hidden>)
 >Re: NSWorkspace and unmounting USB drives (From: Buddy Kurz <email@hidden>)

  • Prev by Date: Re: NSWorkspace and unmounting USB drives
  • Next by Date: Which flavor of objc_msgSend for NSSize return
  • Previous by thread: Re: NSWorkspace and unmounting USB drives
  • Next by thread: Re: NSWorkspace and unmounting USB drives
  • Index(es):
    • Date
    • Thread