Mail Archives: cygwin-developers/2003/01/22/12:21:01
Christopher Faylor wrote:
> I don't know if the requirements for getting case sensitivity
> working on NT could be abstractable into something that would
> allow for future expansion into, oh, I don't know, nfs or
> something but I think it is worthwhile to consider not just
> adding a bunch of "ifs" to the code but going for something
> that could be "plugged in" somehow.
I'm not sure exactly how far you're talking about
going. It sounds like you're suggesting something
that I would have thought goes against the grain
of what Cygwin generally does.
Are you talking about ways to add case-sensitivity
to a truly case-insensitive file system? I've seen
NFS clients that did this. They used reversible
mapping tricks such as replacing "My_file" with
"_my__file" (I'd prefer "%4Dy_file" myself).
If you want a truly generic approach for Win95-like
clients, you may have to do something similar. E.g.,
if you have two conflicting files/directories, you
rename both according to a similar trick (possibly
moving them into a subdirectory of that name if you
want to make the situation more obvious to Windows
clients). Short of accessing the underlying file
system directly, some trick like that is needed to
support case-sensitive directory naming and/or to
avoid using copy-delete to rename files on those
platforms.
I wasn't planning to go that far (and was willing
to forgo Win95 support entirely for the sake of
having a robust solution). If you're willing to
constrain this feature to NT/XP clients, you can
always drop into the Native API. You could then
argue that it's really the responsibility of the
NFS driver to support case-sensitivity for NT.
However far you intend to go, it probably makes
sense to encapsulate these operations into a small
set of case-sensitive functions. That would allow
you to extend case-sensitivity to other platforms
if you were so inclined.
-Jerry
- Raw text -