Re: Path handling routines
Re: Path handling routines
- Subject: Re: Path handling routines
- From: Douglas Davidson <email@hidden>
- Date: Wed, 29 Oct 2008 09:32:16 -0700
On Oct 29, 2008, at 9:24 AM, Jamie Hardt wrote:
The safest way of turning argv[i] into an NSString is with
NSFileManager, thus:
NSString *path = [[NSFileManager defaultManager]
stringWithFileSystemRepresentation:argv[i] length:strlen(argv[i])];
The best way to turn an arbitrary C string path into an NSString is
via NSFileManager, but for arguments specifically one can use
NSProcessInfo to obtain them as an array of NSStrings directly.
Douglas Davidson
_______________________________________________
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