Re: to get handle to "File/1.jpg"
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