MCPcopy Create free account
hub / github.com/FEX-Emu/FEX / OpenFlagToCreation

Function OpenFlagToCreation

Source/Windows/Common/CRT/IO.cpp:68–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66}
67
68DWORD OpenFlagToCreation(int OpenFlag) {
69 if ((OpenFlag & (_O_TRUNC | _O_CREAT)) == (_O_TRUNC | _O_CREAT)) {
70 return CREATE_ALWAYS;
71 }
72 if ((OpenFlag & (_O_EXCL | _O_CREAT)) == (_O_EXCL | _O_CREAT)) {
73 return CREATE_NEW;
74 }
75 if (OpenFlag & _O_TRUNC) {
76 return TRUNCATE_EXISTING;
77 }
78 if (OpenFlag & _O_CREAT) {
79 return OPEN_ALWAYS;
80 }
81 return OPEN_EXISTING;
82}
83
84int AllocateFile(std::unique_ptr<FILE>&& File) {
85 std::scoped_lock Lock {FileTableLock};

Callers 1

DLLEXPORT_FUNCFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected