Sherlock
Sherlock

Reputation: 7597

Enable case-sensitivity on Windows 7

I've got serious troubles with Windows 7 not having a case-sensitive file system.

I'm the only developer who's working on Windows in my team (and we wanna keep it that way for cross-OS checks), and I'm the one producing occasional errors due to Windows not crashing on files with different cases.

Is there any way to make Windows go crazy when I try to include 'aSdF.php' where I meant 'asdf.php'?

Upvotes: 1

Views: 2027

Answers (1)

Jerry Coffin
Jerry Coffin

Reputation: 490278

From a programming viewpoint, you get case sensitivity on Windows by specifying the FILE_FLAG_POSIX_SEMANTICS flag when you call CreateFile.

You do just about have to call CreateFile directly to do that though -- a typical standard library (e.g., if you use fopen in C or std::ifstream::open in C++) will not pass that flag, so file names will be treated as case insensitive.

Upvotes: 2

Related Questions