Re: NSString, path and "/" char
Re: NSString, path and "/" char
- Subject: Re: NSString, path and "/" char
- From: glenn andreas <email@hidden>
- Date: Fri, 24 Nov 2006 12:40:55 -0600
On Nov 24, 2006, at 11:29 AM, Sean McBride wrote:
On 2006-11-24 07:56, Clark Cox said:
Filenames on MacOSX cannot contain '/', period.
I guess that depends on how you define 'filename'. :) Certainly from
the end user's definition of 'filename' your statement is wrong. Both
the Finder and NSSavePanel forbid ':' and allow '/'. And if I put
an HFS
+ disk in an OS 9 machine I can create a file who's name has a
'/'. If
I then move the disk to on OS X machine... then what? The filename is
still the same, isn't it?
Any time the
Finder/file selection dialog shows a file with '/' in the name, that
is actually a ':' in the filename.
How the name is represented on disk depends on the file system.
I'm not
a file systems expert, but I'm pretty sure that, strictly speaking,
HFS+
allows any Unicode character in a filename and that HFS+ doesn't store
paths anywhere, and thus there is no concept of a path separator (at
that level).
But this is all besides the point...
See <http://developer.apple.com/qa/qa2006/qa1392.html> for all the
details about "bdNamErr" (there may be no bad names in the final
system!), and the difference between the BSD APIs and the "Core
Services File Manager" APIs, which handle these two things differently.
Glenn Andreas email@hidden
<http://www.gandreas.com/> wicked fun!
quadrium | flame : flame fractals & strange attractors : build,
mutate, evolve, animate
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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