Re: NSSavePanel does replace / in the filename with a :
Re: NSSavePanel does replace / in the filename with a :
- Subject: Re: NSSavePanel does replace / in the filename with a :
- From: Ken Thomases <email@hidden>
- Date: Sat, 16 Oct 2010 10:03:58 -0500
On Oct 16, 2010, at 9:46 AM, Fritz Anderson wrote:
> On 16 Oct 2010, at 8:44 AM, Ken Thomases wrote:
>
>> (This doesn't happen in Carbon because Carbon still uses colons as path separators.)
>
> It doesn't much matter, but I had thought the imposture was the other way around: Colons are the "real" path separators when HFS+ is the underlying file system, and it is the BSD layer that converts the HFS paths to something that looks like UNIX.
Nope. HFS+ is one of several file system drivers within the kernel. Internal to that driver, colons are treated as path separators.
However, within the kernel, the BSD/POSIX standard prevails. So, the interface to file system drivers uses BSD/POSIX-style names. That style persists up through the kernel, through the BSD/POSIX userland, and into Cocoa (except for display names and GUI).
> So it's not a matter of Carbon "still" using colons.
Yup, it is. Even Carbon is implemented in terms of the BSD/POSIX APIs. So, while colons are path separators within Carbon, they have to be converted to slashes at the interface to BSD/POSIX.
Carbon uses colons even when the underlying file system is UFS or the like. So, Carbon's use of colons as path separators has nothing to do with HFS (anymore) and everything to do with its defined interface semantics. That's all. If HFS were entirely eliminated from Mac OS X some day, that wouldn't change the semantics of Carbon's API, so Apple still wouldn't be free to change its path separator character.
Regards,
Ken
_______________________________________________
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