MCPcopy Create free account
hub / github.com/deathkiller/jazz2-native / RemovePermissionsFromCurrent

Function RemovePermissionsFromCurrent

Sources/Shared/IO/FileSystem.cpp:340–350  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

338 }
339
340 static std::uint32_t RemovePermissionsFromCurrent(std::uint32_t currentMode, FileSystem::Permission mode)
341 {
342 if ((mode & FileSystem::Permission::Read) == FileSystem::Permission::Read)
343 currentMode &= ~S_IRUSR;
344 if ((mode & FileSystem::Permission::Write) == FileSystem::Permission::Write)
345 currentMode &= ~S_IWUSR;
346 if ((mode & FileSystem::Permission::Execute) == FileSystem::Permission::Execute)
347 currentMode &= ~S_IXUSR;
348
349 return currentMode;
350 }
351
352# if !defined(DEATH_TARGET_SWITCH)
353 static std::int32_t DeleteDirectoryInternalCallback(const char* fpath, const struct stat* sb, std::int32_t typeflag, struct FTW* ftwbuf)

Callers 1

RemovePermissionsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected