Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Possible Bug in NSFileManager -moveItemAtPath:toPath:error:




On 31 May 2008, at 22:51, stephen joseph butler wrote:

On Sat, May 31, 2008 at 4:35 PM, Jonathan Dann <email@hidden> wrote:
On 31 May 2008, at 18:17, Jens Alfke wrote:
Try using the system call "rename". (Use "man 2 rename" to see the
documentation.)
Call -fileSystemRepresentation on your path strings to convert them to
appropriate C strings.

I'll have a look at that, would that break if my users have non-ascii filenames? I've only worked with NString, which handles Unicode transparently.

As long as you use fileSystemRepresentation, it always does The Right Thing w.r.t. Unicode encoding.

Awesome! Thanks for your help.

Jon

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

References: 
 >Possible Bug in NSFileManager -moveItemAtPath:toPath:error: (From: Jonathan Dann <email@hidden>)
 >Re: Possible Bug in NSFileManager -moveItemAtPath:toPath:error: (From: Jens Alfke <email@hidden>)
 >Re: Possible Bug in NSFileManager -moveItemAtPath:toPath:error: (From: Jonathan Dann <email@hidden>)
 >Re: Possible Bug in NSFileManager -moveItemAtPath:toPath:error: (From: "stephen joseph butler" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.