Re: (no subject)
Re: (no subject)
- Subject: Re: (no subject)
- From: Andrew Mortensen <email@hidden>
- Date: Sat, 30 Mar 2002 23:26:16 -0500 (EST)
Depends. Do you want to do it using Cocoa? Carbon? BSD calls? All of these
can get you what you want.
For the desktop file/folder content (excluding drives), just use
NSFileManager's -directoryContentsAtPath: method on
NSHomeDirectory()/Desktop. (BSD calls would just be opendir, readdir,
closedir.)
Mounted volumes you can get two ways. The statfs(2) call gives you the
most information, listing all mounted drives and their respective paths.
You could also use the same technique described above to get the Desktop
contents on /Volumes. This second way isn't as good, as it doesn't get the
/ volume name, which is very bad, especially if there's only one
partition, and / is the only mounted drive.
andrew
On Sat, 30 Mar 2002, Mohammad F. Haque wrote:
>
Hi, can somebody point me the direction where i can find out how to get
>
what Disks, folders, and files are on the desktop. in mac os 9, i figure
>
we use the toolbox. what about in os x, how do i go about doing it?
>
>
-Mohammad Haque
>
_______________________________________________
>
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.
_______________________________________________
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.
References: | |
| >(no subject) (From: "Mohammad F. Haque" <email@hidden>) |