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 restrictions.

The server has some way to talk to the drive, so I don't see why the character restrictions couldn't be communicated and reported back through the NFS API.

You could have an NFS server that serves files off a FAT32 drive, for example. Or a special NFS server that requires every third byte of a filename to be an
even number.


I find it hard to accept that any file system would need such complex validation rules. Is there some underlying reason for dynamic validation? I know very little about file systems. Out of curiosity, is there an exotic file system that does more than reject a fixed set of characters?

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 naming scheme while other parts support a different scheme.

That doesn't even require involving an NFS mount. It's true of the local file hierarchy on your Mac. If you use an HFS+ boot drive but mount a FAT32 volume, then you have a single hierarchy with different rules in different parts.

On the other hand, it would be nice if there were an API with which you could at least query the acceptable character set for a specific part (directory). But this would require adding new support in various file sharing protocols. You blithely say it could be reported back through the NFS API, but that requires designing such an API, getting it approved, getting it implemented, and getting it deployed widely enough to matter. And then doing the same for SMB/CIFS, AFP, WebDAV, etc.

Regards,
Ken
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to