This is the mail archive of the
mailing list for the Cygwin project.
RE: file name case sensitivity
- From: "Gerald S. Williams" <gsw at agere dot com>
- To: <cygwin at cygwin dot com>
- Date: Wed, 26 Feb 2003 11:04:26 -0500
- Subject: RE: file name case sensitivity
Shankar Unni wrote:
> > Yes, but in my opinion it could be of use to John Williams because he
> > wanted to "case sensitivity in filenames under Cygwin".
> No, it won't work, because if you remember, he said that he had files
> with the same name but different case *in the same directory*. This
> expressly can*not* be handled by any of the Windows filesystems, even
This isn't entirely true. By specifying POSIX semantics to
the CreateFile command, you can create and access multiple
files differing only by case in the same directory. They
didn't go far enough, since that's only for files and only
a few functions support it, but hopefully I'll be able to
help there soon...
> Anyway, even if if were theoretically possible to force NTFS to be
> case-sensitive (the underlying filesystem does have support for this,
> though Windows doesn't normally expose it), you're still stuck with
> other oddities of the Windows filesystem implementation, like the
> inability to have any file with a base name that is the same as any of
> their devices (i.e. no /usr/include/con.h or /my/src/aux.c).
That's not really a limit of the filesystem. I just created
an "aux" directory using some tools I've been working on.
I've also created files with names like "PRN" (and "prn" in
the same directory).
As you may have guessed, I've been working on this problem
recently. I just put a request into SourceForge to create
a new project: a library I've been calling CaseWise. It's
only for Windows NT/2000/XP since it uses the Native API,
but I'm hoping to get Cygwin to use it eventually. The
library provides direct replacements for Windows API calls
(e.g., CaseWiseCreateDirectory replaces CreateDirectory),
with both ANSI and Unicode versions. I plan to allow calls
to fall back to the original functions on platforms that
don't support CaseWise semantics.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html