• 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: to get handle to "File/1.jpg"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: to get handle to "File/1.jpg"


  • Subject: Re: to get handle to "File/1.jpg"
  • From: "Michael Ash" <email@hidden>
  • Date: Wed, 26 Nov 2008 10:21:40 -0500

On Wed, Nov 26, 2008 at 9:56 AM, Nick Rogers <email@hidden> wrote:
> Hi,
> How do I obtain a NSFileHandle to this file which has a forward slash in the
> name to be able to write to this file.
> Supplying the path to NSFileHandle with filename in quotes also fails.

Filenames cannot have slashes in them. If you think that your file has
one, then you are wrong. Very likely you think that it does because
Finder or other GUI apps are showing it to you that way. This is a
lie. A file which they display as having a / actually has a :, and the
character has been swapped dynamically. The slash is reserved as the
path separator and cannot be used as part of a filename. So try using
: instead.

> If not possible is there any other way to write to such a file.
> I can't use open(), as the file name could contain chars from other
> language.

This does not make sense. *Everything* uses open() in the end. It
handles other languages just fine as long as you use the correct
encoding, which on Mac OS X is UTF-8.

Mike
_______________________________________________

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

References: 
 >to get handle to "File/1.jpg" (From: Nick Rogers <email@hidden>)

  • Prev by Date: Re: Code signing and verification
  • Next by Date: Re: Number of Files on Volume
  • Previous by thread: Re: to get handle to "File/1.jpg"
  • Next by thread: Re: to get handle to "File/1.jpg"
  • Index(es):
    • Date
    • Thread