Re: How do I create a file name with a "/" in it?
Re: How do I create a file name with a "/" in it?
- Subject: Re: How do I create a file name with a "/" in it?
- From: "Sean McBride" <email@hidden>
- Date: Thu, 22 Sep 2005 10:44:55 -0400
- Organization: Rogue Research
On 2005-09-21 17:48, John Stiles said:
>At any rate, in Cocoa, if you say NSLog( [myPath
>fileSystemRepresentation] ), you will see the ":" character where the
>filename has slashes. Terminal behaves the same way. Posix file
>commands like fopen also expect colons where slashes ought to be.
>This disparity is visible to the end user in many places; as a random
>example (this was the first thing I tried, and it worked), try
>putting a slash in the filename of an image, opening it in
>Preview.app, and then do Tools > Get Info. There's that colon.
fileSystemRepresentation and lastPathComponent will give you paths with
colons in them. I think lots of apps are using these methods when they
really want to be using NSFileManager's displayNameAtPath. It would be
nice if the docs for the former mentioned the latter. :) It would also
be nice if NSString had methods for the display name.
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden