Re: Mount Point
Re: Mount Point
- Subject: Re: Mount Point
- From: "stephen joseph butler" <email@hidden>
- Date: Wed, 28 May 2008 15:57:30 -0500
On Wed, May 28, 2008 at 3:51 PM, Randall Meadows <email@hidden> wrote:
> On May 28, 2008, at 12:36 PM, Mr. Gecko wrote:
>
>> Hello I have a program that finds a device by it's device number such as
>> /dev/disk2s3 how would I find out the mount point/name of that device?
>> If not how can I find the device number and name from a mount point?
>
> One brute force way would be to use NSTask to call 'df' and parse the
> output; that provides you both the device names and their mount points.
A better way would be to use 'diskutil info -plist /dev/diskXsY'. An
even better way would be to use DADiskCreateFromBSDName followed by
DADiskCopyDescription. I think the mount point is somewhere in the
description.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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