• 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: Difference between dvd and dmg
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Difference between dvd and dmg
      • From: "Gerriet M. Denkmann" <email@hidden>
References: 
 >Difference between dvd and dmg (From: "Gerriet M. Denkmann" <email@hidden>)

  • Prev by Date: Re: -observeValueForKeyPath:ofObject:change:context: only defined for abstract class. Runtime error
  • Next by Date: Re: -observeValueForKeyPath:ofObject:change:context: only defined for abstract class. Runtime error
  • Previous by thread: Difference between dvd and dmg
  • Next by thread: Re: Difference between dvd and dmg
  • Index(es):
    • Date
    • Thread