MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / access

Method access

Libraries/FileSystem/FileSystem.cpp:919–932  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

917}
918
919SC::Result SC::FileSystem::Operations::access(StringSpan path, AccessMode accessMode)
920{
921 SC_TRY_MSG(Internal::validatePath(path), "access: Invalid path");
922
923 int mode = 0;
924 switch (accessMode)
925 {
926 case AccessMode::Exists: mode = 0; break;
927 case AccessMode::Read: mode = 4; break;
928 case AccessMode::Write: mode = 2; break;
929 case AccessMode::Execute: mode = 0; break;
930 }
931 return Result(::_waccess(path.getNullTerminatedNative(), mode) == 0);
932}
933
934SC::Result SC::FileSystem::Operations::makeDirectory(StringSpan path)
935{

Callers

nothing calls this directly

Calls 2

posixAccessModeFunction · 0.85
ResultClass · 0.50

Tested by

no test coverage detected