Re: Renaming a file repositions icon in Finder

2009-05-11 Thread Jim Turner
On Fri, May 8, 2009 at 5:45 PM, Sean McBride wrote: > On 5/8/09 2:52 PM, Jim Turner said: > >>It appears that renaming a file will cause the Finder to reposition >>the icon for the file if it's currently displayed in a icon view >>somewhere.  Is there any way to prevent that from happening?  It lo

Re: Renaming a file repositions icon in Finder

2009-05-08 Thread Sean McBride
On 5/8/09 2:52 PM, Jim Turner said: >It appears that renaming a file will cause the Finder to reposition >the icon for the file if it's currently displayed in a icon view >somewhere. Is there any way to prevent that from happening? It looks >very strange to have icons jump all over the place jus

Re: Renaming a file

2009-03-16 Thread Mike Abdullah
NSFileManager. Also, please do not cross-post between lists; especially the Core Audio list which is completely unsuited to such a question. On 16 Mar 2009, at 11:49, rethish wrote: Hi , How can I rename files that is stored in the document folder of an iphone application. Thank you.

Re: renaming a file with special/reserved characters in name

2009-02-28 Thread Shawn Erickson
On Sat, Feb 28, 2009 at 8:58 AM, Shawn Erickson wrote: > On Sat, Feb 28, 2009 at 8:45 AM, Clark Cox wrote: > >>>... not sure what Michael is >>> talking about. >> >> On Leopard, invalid bytes will indeed be escaped: > > Ah going back over the email chain I now get the context of the > conversatio

Re: renaming a file with special/reserved characters in name

2009-02-28 Thread Shawn Erickson
On Sat, Feb 28, 2009 at 8:45 AM, Clark Cox wrote: >>... not sure what Michael is >> talking about. > > On Leopard, invalid bytes will indeed be escaped: Ah going back over the email chain I now get the context of the conversation when Michael made his comment about escaping. Anyway I was mostly

Re: renaming a file with special/reserved characters in name

2009-02-28 Thread Michael Ash
On Sat, Feb 28, 2009 at 11:49 AM, Shawn Erickson wrote: > On Sat, Feb 28, 2009 at 8:07 AM, Michael Ash wrote: > >> $ python -c 'open("hello\xaa\xbb\xccworld", "w")';ls >> hello%AA%BB%CCworld > > The POSIX APIs on Mac OS X expect UTF-8 paths. The above isn't UTF-8. Well yes, that's the whole poin

Re: renaming a file with special/reserved characters in name

2009-02-28 Thread Shawn Erickson
On Sat, Feb 28, 2009 at 8:07 AM, Michael Ash wrote: > $ python -c 'open("hello\xaa\xbb\xccworld", "w")';ls > hello%AA%BB%CCworld The POSIX APIs on Mac OS X expect UTF-8 paths. The above isn't UTF-8. Try the following which is the same in UTF-8... MacPro:~ shawnce$ python -c 'open("working_hell

Re: renaming a file with special/reserved characters in name

2009-02-28 Thread Clark Cox
On Fri, Feb 27, 2009 at 2:35 PM, Shawn Erickson wrote: > On Fri, Feb 27, 2009 at 2:15 PM, Martin Wierschin wrote: > >> On 2009.02.27, at 5:58 AM, Michael Ash wrote: >> >>> HFS+ only accepts non-UTF-8 by URL-encoding (!) the non-UTF-8 bytes >> >> Wow, that's pretty horrific. > > It also isn't real

Re: renaming a file with special/reserved characters in name

2009-02-28 Thread Michael Ash
On Fri, Feb 27, 2009 at 5:35 PM, Shawn Erickson wrote: > On Fri, Feb 27, 2009 at 2:15 PM, Martin Wierschin wrote: > >> On 2009.02.27, at 5:58 AM, Michael Ash wrote: >> >>> HFS+ only accepts non-UTF-8 by URL-encoding (!) the non-UTF-8 bytes >> >> Wow, that's pretty horrific. > > It also isn't real

Re: renaming a file with special/reserved characters in name

2009-02-27 Thread Shawn Erickson
On Fri, Feb 27, 2009 at 2:15 PM, Martin Wierschin wrote: > On 2009.02.27, at 5:58 AM, Michael Ash wrote: > >> HFS+ only accepts non-UTF-8 by URL-encoding (!) the non-UTF-8 bytes > > Wow, that's pretty horrific. It also isn't really correct. HFS+ doesn't use UTF-8 it uses and stores Unicode (full

Re: renaming a file with special/reserved characters in name

2009-02-27 Thread Martin Wierschin
On 2009.02.26, at 9:20 PM, Ken Thomases wrote: One issue is that on Unix, there's a single file hierarchy. Various file systems, drives, volumes, shares, what-have-you are mounted _into_ this file hierarchy. So, if you have an NFS share mounted, some parts of it may support one file nami

Re: renaming a file with special/reserved characters in name

2009-02-27 Thread Michael Ash
On Fri, Feb 27, 2009 at 12:05 AM, Martin Wierschin wrote: > Hi Michael, > >> There *can't* be an API for it. Take the case of NFS. NFS has no >> character set restrictions beyond the basics that apply to all UNIXen. >> But the underlying filesystem that the NFS server is writing things to >> may w

Re: renaming a file with special/reserved characters in name

2009-02-26 Thread Ken Thomases
On Feb 26, 2009, at 11:05 PM, Martin Wierschin wrote: There *can't* be an API for it. Take the case of NFS. NFS has no character set restrictions beyond the basics that apply to all UNIXen. But the underlying filesystem that the NFS server is writing things to may well have more restriction

Re: renaming a file with special/reserved characters in name

2009-02-26 Thread Martin Wierschin
Hi Michael, There *can't* be an API for it. Take the case of NFS. NFS has no character set restrictions beyond the basics that apply to all UNIXen. But the underlying filesystem that the NFS server is writing things to may well have more restrictions. The server has some way to talk to the dri

Re: renaming a file with special/reserved characters in name

2009-02-26 Thread Michael Ash
On Thu, Feb 26, 2009 at 12:52 PM, Mike Abdullah wrote: > This sounds a very interesting thing to watch out for. Do you know how > NSString's -fileSystemRepresentation method handles NUL characters? I'm > thinking ideally it should strip them for you. Ideally it should. Practically it doesn't. Ins

Re: renaming a file with special/reserved characters in name

2009-02-26 Thread Mike Abdullah
Except it doesn't, because each filesystem is different. The above is true for HFS+, it is NOT true for FAT32, which has a whole bunch of other characters which are illegal. This is the bad news: there is NO way to tell what those characters are. It seems totally crazy that there isn't an A

Re: renaming a file with special/reserved characters in name

2009-02-26 Thread Michael Ash
On Thu, Feb 26, 2009 at 2:29 AM, Martin Wierschin wrote: >> Except it doesn't, because each filesystem is different. The above is >> true for HFS+, it is NOT true for FAT32, which has a whole bunch of >> other characters which are illegal. >> >> This is the bad news: there is NO way to tell what t

Re: renaming a file with special/reserved characters in name

2009-02-26 Thread Mike Abdullah
On 26 Feb 2009, at 07:29, Martin Wierschin wrote: Hi Michael, I appreciate your reply, thank you. The first is the slash (/). Note, NOT a backslash (\), that one is fine. Slash is the path separator and thus can't exist in a filename. Whoops, quite right, my mistake. Except it doesn't, b

Re: renaming a file with special/reserved characters in name

2009-02-25 Thread Martin Wierschin
Hi Michael, I appreciate your reply, thank you. The first is the slash (/). Note, NOT a backslash (\), that one is fine. Slash is the path separator and thus can't exist in a filename. Whoops, quite right, my mistake. Except it doesn't, because each filesystem is different. The above is tru

Re: renaming a file with special/reserved characters in name

2009-02-25 Thread Michael Ash
On Wed, Feb 25, 2009 at 7:47 PM, Martin Wierschin wrote: > Hello everyone, > > Forgive me if this has already been answered, but my searches through the > archive didn't turn up anything. > > The situation is that I need to allow users to rename files within my > application. The name of the file