• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How do I create a file name with a "/" in it?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >How do I create a file name with a "/" in it? (From: Michael <email@hidden>)
 >Re: How do I create a file name with a "/" in it? (From: John Stiles <email@hidden>)
 >Re: How do I create a file name with a "/" in it? (From: Lachlan Cotter <email@hidden>)
 >Re: How do I create a file name with a "/" in it? (From: John Stiles <email@hidden>)
 >Re: How do I create a file name with a "/" in it? (From: Corbin Dunn <email@hidden>)
 >Re: How do I create a file name with a "/" in it? (From: John Stiles <email@hidden>)

  • Prev by Date: Fwd: GNUstep bounty
  • Next by Date: Where to put background tools in package?
  • Previous by thread: Re: How do I create a file name with a "/" in it?
  • Next by thread: Re: How do I create a file name with a "/" in it?
  • Index(es):
    • Date
    • Thread