Path to desktop
Path to desktop
- Subject: Path to desktop
- From: Micha Fuhrmann <email@hidden>
- Date: Mon, 9 Jul 2007 18:42:15 +0200
Ok,
I'm bit tired today, sorry for my laziness, I just need the full path
of the User's desktop, how can I get it in 3 simple lines of code, I
would hate to resort to an Apple Script that gives me what I want in
6 words (set thePath to path to desktop)! Here's what I've played with:
NSArray* paths = NSSearchPathForDirectoriesInDomains
( NSDesktopDirectory, NSUserDomainMask, NO );
NSString *theDesktopPath = [paths objectAtIndex:0];
Do I really need to reconstruct the full path with
stringByAppendingPathComponent ?
There's got to be something simple!!!
Any help very much appreciated.
Micha
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden