Re: renaming a file with special/reserved characters in name
Re: renaming a file with special/reserved characters in name
- Subject: Re: renaming a file with special/reserved characters in name
- From: Martin Wierschin <email@hidden>
- Date: Wed, 25 Feb 2009 23:29:48 -0800
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
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 API for this, Cocoa or
not. Oh well, obviously one must code to handle a failure in the
rename operation, so this actually simplifies my task. I still have
to hardcode the magic conversion of slashes to colons- a shame.
Thanks again,
~Martin
_______________________________________________
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