Re: Difference between dvd and dmg
Re: Difference between dvd and dmg
- Subject: Re: Difference between dvd and dmg
- From: Jonathon Mah <email@hidden>
- Date: Tue, 11 Oct 2005 22:34:02 +0930
Gerriet,
On 2005-10-11, at 18:51, Gerriet M. Denkmann wrote:
I have mounted a data dvd and some dmg.
Both (in getfsstat) have:
fstypename = hfs
mntfromname = /dev/disk...
NSFileManager fileExistsAtPath:isDirectory: reports an existing
directory for both cases.
Question:
How can I distinguish between an hfs-filesystem (as in the case of
dmg) and just a directory (as in the case of a data-dvd)?
Your final question is a bit confusing, as a mounted DVD has its own
filesystem too (it's not "just a directory"). Anyway, one way to
determine if a volume is an image or not is to use hdiutil. It
shouldn't be hard to make an NSTask run "hdiutil info -plist" and get
an NSDictionary from the result.
An alternative is to use DiskImages.framework, but this is private.
Jonathon Mah
email@hidden
_______________________________________________
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