On Fri, Feb 27, 2009 at 12:05 AM, Martin Wierschin <mar...@nisus.com> wrote:
> Hi Michael,
>
>> 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.

Well yes, in a perfect world where everything Does the Right Thing, of
course it could be done.

But we don't live in a perfect world. We live in a pretty crappy
world, a world where Worse is Better rules everything, a world where
UNIX, of all the terrible, no-good OSes has taken over all computing
above the embedded level. In that world, it cannot be done. Apple
couldn't add such an API because it doesn't control enough stuff to
make it happen. Nobody else adds such an API because they don't care.

>> 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?

Well, my example is obviously contrived. However, it's easy to imagine
an FS which, say, only accepts UTF-8 instead of the anything-goes
8-bit fun that happens on most FSes. HFS+ only accepts non-UTF-8 by
URL-encoding (!) the non-UTF-8 bytes, so it's pretty close to that.

More to the point, though, NFS has no way to communicate *any*
information about what kind of filenames the underlying filesystem
will accept, beyond returning an error code when you use a "bad" one.

Mike
_______________________________________________

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