• 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: "Shawn Erickson" <email@hidden>
  • Date: Fri, 11 May 2007 11:07:44 -0700

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


  • Follow-Ups:
    • Re: NSWorkspace and unmounting USB drives
      • From: Buddy Kurz <email@hidden>
References: 
 >NSWorkspace and unmounting USB drives (From: Buddy Kurz <email@hidden>)

  • Prev by Date: Re: Scope variable pattern
  • Next by Date: Can an NSControl (tableview) track focus on individual cells? (was:Tabbing to NSPopUpButtonCells in a table?)
  • Previous by thread: NSWorkspace and unmounting USB drives
  • Next by thread: Re: NSWorkspace and unmounting USB drives
  • Index(es):
    • Date
    • Thread