• 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: Path of USB drive on Mac????
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Path of USB drive on Mac????


  • Subject: Re: Path of USB drive on Mac????
  • From: Nicko van Someren <email@hidden>
  • Date: Sat, 30 Jul 2005 16:04:53 +0100

On 30 Jul 2005, at 13:36, darpan kamboj wrote:

I want to raw read the file from the USB drive. But on Mac i don't know the path from which i read the file in USB drive. Plz if any body know the path of USB drive on mac then reply me.

This is not really a Cocoa question, but I'll point you in the right direction.


If the device is mounted as a drive and you know the path under which the device is mounted you can use the statfs() system call to get the filing system path of the underlying device, which you can then open as a simple file.

If you don't know the path under which your USB drive is mounted but the user us capable of picking it from a list you can get the list of mounted removable media from:
[[NSWorkspace sharedWorkspace] mountedRemovableMedia]
To make this list look pretty you might want to strip the "/Volumes/" of the front of each item before you display them.


If you don't know where the device is mounted, or if it has some unsupported file system format so it is never going to be mounted, then you are going to need to dig deeper into the world of IOKit, which is definitely off topic for this list. I'd start by reading the documentation at on IOKit and the USB system at:
http://developer.apple.com/documentation/DeviceDrivers/ Conceptual/IOKitFundamentals/
http://developer.apple.com/documentation/DeviceDrivers/ Conceptual/USBBook/
and then move on to the Apple USB list for more help.


    Cheers,
        Nicko

_______________________________________________
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


References: 
 >Path of USB drive on Mac???? (From: "darpan kamboj" <email@hidden>)

  • Prev by Date: Scanfloat & Locale
  • Next by Date: Re: Newbie: Getting an NSWindow and setting its delegate
  • Previous by thread: Path of USB drive on Mac????
  • Next by thread: NSTextField
  • Index(es):
    • Date
    • Thread