On Mar 14, 2010, at 3:42 PM, Don Quixote de la Mancha wrote: > On Sun, Mar 14, 2010 at 12:22 PM, gMail.com <mac.iphone....@gmail.com> wrote: >> I can't find a way in Cocoa to mount a dmg disk. >> So I would try to call the shell through a NSTask. > > I think you really want to do that via the APIs in the Disk > Arbitration framework. > > Unfortunately it's rather poorly documented, but it does work if you > can figure it out. > > I might have some sample code I could dig up if you're not able to > figure it out on your own. > > Don Quixote
Well actually, Disk Arbitration can't operate on the disk image until you at least attach it with "hdiutil attach", which is when the /dev/disk* entries are created. The OP has solved his problem, but for reference I have a project that uses Disk Arbitration and hdiutil to manage disk mounting which can be found here: http://github.com/aburgh/Disk-Arbitrator It has examples of using Disk Arbitration and of interacting with hdiutil, including checking a disk image to see if it is encrypted. HTH, Aaron _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com