5

I'm aware that FILE_FLAG_POSIX_SEMANTICS allows for case sensitivity in file names, but the fact that it wasn't named FILE_FLAG_CASE_SENSITIVE makes me think it might be doing more than that.

Does it do anything else, or am I analyzing this too deeply?

user541686
  • 205,094
  • 128
  • 528
  • 886
  • For a 32bit flag on an core API - CreateFile which is about file which is almost everything about IO, each bit is so important that the team need a lot of think to decide. Obviously finally they decide it to be FILE_FLAG_POSIX_SEMANTICS , maybe at first it is FILE_FLAG_CASE_SENSITIVE. Maybe Bill Gates participates this too you can email him to check. – jw_ Feb 11 '20 at 09:37

1 Answers1

4

As far as I know, it only gives case sensitivity. I suspect they originally named it that way because they were as uncertain as the rest of us whether supporting POSIX semantics might involve something more than case sensitivity. This way if it turned out they needed to do more, they could just fix the bug in their implementation of POSIX semantics rather than requiring a fundamental change in the specification.

Jerry Coffin
  • 476,176
  • 80
  • 629
  • 1,111
  • 1
    A * is valid character in a file name on Unix. And others. – Hans Passant Aug 20 '11 at 10:07
  • @Hans: True, but that's not required by POSIX (which specifies a few restrictions on file names, and allows an implementation to impose more -- which Windows does, so even with FILE_FLAG_POSIX_SEMANTICS, attempting to create a file with "*" in the name will fail). – Jerry Coffin Aug 20 '11 at 21:00
  • 1
    You do have to set the time machine back to 1992. – Hans Passant Aug 21 '11 at 11:08