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: How to rename a filename in uppercase




On Jan 20, 2008, at 1:27 PM, Simone Tessaro wrote:

2008/1/20, Mike Abdullah <email@hidden>:

On 20 Jan 2008, at 17:36, Simone Tessaro wrote:

Hi,
i've a question. I'm trying to write some code that make a filename in
uppercase. i wrote a thing like that:
[defaultManager movePath:@"foo.txt" toPath:@"FOO.txt" handler:nil];

What happens if you implement a handler? Any indication of why it might be failing?

I did it. and this is the result: {Error = "Already Exists"; Path = "/Users/username/Desktop/foo.txt"; }

so the problem could be something about the case-sensitiveness.

This will only work if the underlying file system is case sensitive. HFS just plays a case sensitive file system on TV, but in reality it is not.


Simple test: In a terminal window go to some directory and

	touch foo
	touch FOO

On a real cases sensitive file system you end up with 2 files, foo and FOO. But on most file systems OS X systems use, it will be just 1 file.

Gerd

_______________________________________________

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: 
 >How to rename a filename in uppercase (From: "Simone Tessaro" <email@hidden>)
 >Re: How to rename a filename in uppercase (From: Mike Abdullah <email@hidden>)
 >Re: How to rename a filename in uppercase (From: "Simone Tessaro" <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.