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: Renaming issues



On 2005-05-31 15:26, Massimiliano Origgi said:

>I'm having issues in renaming files programmatically.
>The problem is that they lose the Finder comment after being renamed.
>I'm currently using the NSFileManager to perform the operation, which
>seems the only Cocoa based solution available.

Doing "mv oldname newname" also has this problem, as well as others, like
loosing the icon position, etc.  Maybe that's how NSFileManager is doing
it... lame.  Do file a bug, destroying user data is bad.

>I've looked around so far, but I haven't found a real answer to this
>issue, I was even considering scripting the Finder, but it would be
>ugly and slow.
>Does anyone have an 'official' solution to this problem?

How about FSRenameUnicode()?  Which I found by searching the headers for
'rename'.

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

This email sent to email@hidden

References: 
 >Renaming issues (From: Massimiliano Origgi <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.