| 165 | #endif |
| 166 | |
| 167 | bool directoryExists(const string& path) { |
| 168 | #if defined(OS_WIN) |
| 169 | struct _stat status; |
| 170 | return _stat(path.c_str(), &status) == 0 && (status.st_mode & S_IFDIR) != 0; |
| 171 | #else |
| 172 | struct stat status {}; |
| 173 | // NOLINTNEXTLINE(hicpp-signed-bitwise) |
| 174 | return stat(path.c_str(), &status) == 0 && (status.st_mode & S_IFDIR) != 0; |
| 175 | #endif |
| 176 | } |
| 177 | |
| 178 | bool createDirectory(const string& path) { |
| 179 | #if defined(OS_WIN) |
no test coverage detected