• 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
detecting removable media
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

detecting removable media


  • Subject: detecting removable media
  • From: Tim Gogolin <email@hidden>
  • Date: Thu, 20 Oct 2005 16:16:57 -0500

How reliable is
- [ NSWorspace getFileSystemInfoForPath:isRemovable:isWritable:isUnmountable:descriptio n:type:];
?


I wrote a simple test Cocoa app to test this API and its correctly says that a file located on a Lexar CF Card reader is both "removable" and "unmountable", but it incorrectly says that a file on a USB flash memory jump disk is NOT removable and NOT unmountable. This, despite the fact that the Finder puts a little "eject" icon by the volume icon and correctly unmounts it when asked.

NSWorkspace is consistent (in its error) in that [ NSWorkspace mountedRemovableMedia ] also fails to list my flash drive.

Could this incorrect answer by driven by a defect in the firmware of the USB flash drive?
I will try to scrounge up a few other devices and see if its answers are more right than wrong, but so far its only batting 0.500 :-)


Is there a better API to use to detect whether a file is on a potentially "removable" file system?
Clearly the Finder is getting a different answer in what API its using...


-- Tim G.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Killing a daemon process
  • Next by Date: NSBezierPath containsPoint?
  • Previous by thread: Re: Killing a daemon process
  • Next by thread: NSBezierPath containsPoint?
  • Index(es):
    • Date
    • Thread