MCPcopy Create free account
hub / github.com/catboost/catboost / GetFileMode

Function GetFileMode

util/system/fstat.cpp:45–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45static ui32 GetFileMode(DWORD fileAttributes, ULONG reparseTag) {
46 ui32 mode = 0;
47 if (fileAttributes == 0xFFFFFFFF) {
48 return mode;
49 }
50
51 mode |= GetWinFileType(fileAttributes, reparseTag);
52
53 if ((fileAttributes & FILE_ATTRIBUTE_READONLY) == 0) {
54 mode |= _S_IWRITE;
55 }
56 return mode;
57}
58
59 #define S_ISDIR(st_mode) (st_mode & _S_IFDIR)
60 #define S_ISREG(st_mode) (st_mode & _S_IFREG)

Callers 1

MakeStatFunction · 0.85

Calls 1

GetWinFileTypeFunction · 0.85

Tested by

no test coverage detected