| 160 | } |
| 161 | |
| 162 | static 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 | |
| 173 | static bool parsePortOffset(const char* value, uint16_t& parsedOffset) |
| 174 | { |
no test coverage detected