← Back to context

Comment by AshamedCaptain

2 years ago

> Did you confuse the file with it's containing directory?

No.

> Citation needed. https://learn.microsoft.com/en-us/dotnet/api/system.io.file.... doesn't warn of any such thing.

https://learn.microsoft.com/en-us/windows/win32/api/winbase/...

OF_EXIST: Opens a file and then closes it.

It's literally open file ! Are you dense?

OpenFile() opens the file??? c'est incroyable!

OF_EXISTS is just a side effect of some actual operation. It's some related info you you get along the way. You would not use that as the way to only check the file. Holy cow. Please do continue trying to spread the wisom.

  • You are the one claiming that OpenFile(OF_EXIST) does not open the file. Scroll a bit above. My initial comment was:

    > In fact, I imagine File.Exists()/OF_EXISTS also opens the file (then immediately closes it).

    • "You are the one claiming that OpenFile(OF_EXIST) does not open the file."

      I never said any such thing.

      Yet another trivially verified false statement. Fits the pattern.

      2 replies →