apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Re: [dav-dev] FW: Case-insensitive file system moves
Date Sat, 26 May 2001 00:11:02 GMT
From: "Luke Kenneth Casson Leighton" <lkcl@samba-tng.org>
Sent: Friday, May 25, 2001 6:18 PM

> NOTE: :)
> the underlying filesystem on NT is *case insensitive*.
> most of NT's *published* APIs are redirectors.

Put another way, the Win32 API to the NTFS filesystem is 
case insensitive, case preserving.  The Win32 API to the FAT32
file system is very different, but also CI CP.

> i.e. you can provide, sayyy... on the filesystem API,
> a Win32 filesystem API, a posix-compliant filesystem API,
> whatever-you-like API.

And as you point out, they do, with caviats.

> sadly, and _even inside microsoft_, the underlying APIs
> are either kept private or not published.
> this is to stop developers writing to APIs that may result
> in forcing ms to support 'legacy' APIs, even though they
> didn't want you to use it in the first place.
> so, the point of this message is to let you know that
> it _is_ possible to do case-sensitive file access etc.
> _however_ this will result in at least two nasty things happening:
> 1) a file that is named foo and a file named Foo will,
> when accessed via explorer.exe or any other program that
> uses the Win32 file api, cause massive problems - including
> crashing of programs. users will be unable to see one
> of the files, or worse, unable to delete one or both of them.

Correct, unless the directory is accessed only with the POSIX flags,
great pain and ugliness results.  Imaging saving foo.exe and unintentionally
running Foo.exe :-(

> 2) if ms decides to remove or change the discouraged API,
> well, then apr will break, and people will start bitching.
> probably 50% at ms, and 50% at you :)

Well, that's MS - you never know what the API will retain tommorow.

But that isn't the question.  The FAT32 system won't let you call rename
to change the name Foo to FOO, it considers them identical.  NTFS, on the
other hand, is perfectly happy to rename Foo to FOO.

Go figure.

So we aren't suggesting having multiple files with the same (case-varied)
names, but simply allowing the user to rename the 'case' of a file.

And I agree with you, the POSIX open is _not_ the way to handle this,
I don't even know that it would walk around the FAT32 restriction.


View raw message