views:

205

answers:

3

Hi guys

I have a external 1TB drive which is not getting recognized by my program as removable storage device.

I have in my code the following lines to detect the removable drives attached to the machine.

NSArray *removableDrivesPaths = [[NSWorkspace sharedWorkspace] mountedRemovableMedia];

Please can you guys tell me a method to get my external drives get detected as removable storage devices or if there is any other cocoa framework function that i can use to detect my external drives as removable storage devices.

Thanks

A: 

Not sure what you're trying to do, but if you'd just like to access files from the device it should appear as a drive under /Volumes.

Benjamin Cox
I have an app which should launch only from external removable storage devices like usb drives. All drives are shown under /Volumes but my app should check if it is launched from a removable storage device. so it checks its launch path to match if its a removable storage path.
King
+1  A: 

"Removable" media is one that is physically distinct from the drive it is placed within - i.e. a floppy or a CD drive. So this is correct in not returning external hard drives. I'm not sure how you would go about finding the information you want, though.

Steven Schlansker
A: 

If you find a solution, I will ba glad to share it because Iface exactly the same problem with a multiplatform program where I only need to access to SD Card or Usb key

Regards

Alain

Alain BUFERNE