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

Function pathExistsDirectory

Libraries/Testing/Testing.cpp:162–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162static bool pathExistsDirectory(StringSpan path)
163{
164#if SC_PLATFORM_WINDOWS
165 const DWORD attr = ::GetFileAttributesW(path.getNullTerminatedNative());
166 return attr != INVALID_FILE_ATTRIBUTES && (attr & FILE_ATTRIBUTE_DIRECTORY) != 0;
167#else
168 struct stat info;
169 return ::stat(path.getNullTerminatedNative(), &info) == 0 && S_ISDIR(info.st_mode);
170#endif
171}
172
173static bool parsePortOffset(const char* value, uint16_t& parsedOffset)
174{

Callers 2

repoHasMarkersFunction · 0.85

Calls 1

statClass · 0.70

Tested by

no test coverage detected