Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Dec 3, 2011, 06:04 AM   #1
waqarg
macrumors newbie
 
Join Date: Dec 2011
Disk Access at raw level

Hi,

Em new to mac, em not familiar with xcode and its libraries, i want to access my hard drive sectors means want to read them using objective c in cocoa application... any help would be highly appreciated....
Regards,
waqarg is offline   0 Reply With Quote
Old Dec 3, 2011, 12:56 PM   #2
kainjow
Moderator emeritus
 
kainjow's Avatar
 
Join Date: Jun 2000
There are no Objective-C classes out of the box for this. Of course you can write your own. Simplest way is to use DiskArbitration framework to get the available drives, grab the BSD name (kDADiskDescriptionMediaBSDNameKey) from the DADiskRef and feed that to opendev().

Internal/startup drives requires root permission to open though.
kainjow is offline   0 Reply With Quote
Old Dec 5, 2011, 03:38 AM   #3
waqarg
Thread Starter
macrumors newbie
 
Join Date: Dec 2011
Hi kainjow!

Thanks a lot for reply, now em going to check what you have suggested....
For others, any other simpler way or suggestion could be an absolute pleasure for me.....
waqarg is offline   0 Reply With Quote
Old Dec 5, 2011, 06:35 AM   #4
foidulus
macrumors 6502a
 
Join Date: Jan 2007
Not really going to find anything simpler, Apple's Objective-C frameworks were never really designed to go that low level, so you are stuck using the C API for most things(and as luck would have it, all valid C code is valid Objective-C code )
foidulus is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
l use OSX10.9.1 and want to know if can still access disk image if forgotten its pw? Appletise OS X Mavericks (10.9) 3 Feb 17, 2014 01:25 PM
what is the next level of disk repair? ebobster OS X 10.8 Mountain Lion 4 May 4, 2013 09:52 AM
[iPhone] Bubble Level - Elegant and accurate level app - FREE - out today! Phoenix Mobile iPhone and iPod touch Apps 1 Mar 26, 2013 11:21 PM
Mid Level Mac Mini outperform base Level Imac 21.5 (2011) tears2040 Mac mini 9 Oct 26, 2012 05:27 AM
access hard disk Drich290195 Mac Basics and Help 3 Aug 21, 2012 02:15 PM

Forum Jump

All times are GMT -5. The time now is 06:31 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC