Re: Grabing Disk Information
Re: Grabing Disk Information
- Subject: Re: Grabing Disk Information
- From: Brian Bergstrand <email@hidden>
- Date: Wed, 28 Apr 2004 16:26:05 -0500
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Matt,
I've written code specifically to do what you want, and it just so
happens the data is going into an NSOutlineView too.
<
http://cvs.sourceforge.net/viewcvs.py/ext2fsx/src/extfsmgr/>
This is a preference pane that does exactly what you want. It is split
into a "core" and GUI. The core can be easily dropped into any other
Cocoa project, and is fully Header Doc'd. The actual pref pane, uses
the core to display the data in an NSOutline view. It's not header
doc'd, but should not be too hard to figure out.
buildtest.sh in the same directory will build a simple CLI tool to test
the core. More importantly, it will show you what libs you need to link
against. You will also need to grab:
<
http://cvs.sourceforge.net/viewcvs.py/ext2fsx/src/gnu/ext2fs/
ext2_fs.h> and ext2_bigendian.h, ext2_byteorder.h from
<
http://cvs.sourceforge.net/viewcvs.py/ext2fsx/src/> as the core needs
these headers to build (although removing the dependency would be
fairly simple).
All of the source is under a BSD style license.
Your other choice is to use Apple's private DiskManager interface. You
could use class-dump to get the interfaces, and then go from there.
HTH.
PS. Mail may add some 's to the URL's (wish Apple would fix this) so
if they fail you know what to look for.
On Apr 28, 2004, at 3:29 PM, Matthew Jaffa wrote:
>
Hi,
>
>
I was wondering the way to grab all the Hard Drives infos.
>
>
Like in Disk Utility, How do they obtain the different Hard Drives
>
that are on the system.
>
>
I know they begin with /dev/disk#
>
>
and then if the disk is partitioned they have /dev/disk#s#
>
>
I am creating an NSOutline View that I am going to populate with this
>
stuff just like in Disk Utility, So I need to be able to get the list
>
of Drives,
>
and also get information about them, like Disk Utility presents :
>
size, Mount point, etc.
>
>
>
Is there some Objective-C api that does this, or CoreFoundation?
>
>
Thanks,
>
Matt
>
Brian Bergstrand <
http://www.bergstrand.org/brian/>, AIM: triryche206
PGP Key: <
http://www.bergstrand.org/brian/misc/public_key.txt>
A banker is a fellow who lends you his umbrella when the sun is
shining, but wants it back the minute it begins to rain. - Mark Twain
As of 04:09:35 PM, iTunes is playing "14 Years" from "Use Your Illusion
II" by "Guns N' Roses"
-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0.3
iQA/AwUBQJATY3nR2Fu2x7aiEQKa/QCfRRxO4tdHNjozuPX2VgHGkPqPO0EAoOdB
PsE3h+teKLySZDpvfsDJF6Ks
=/azd
-----END PGP SIGNATURE-----
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.