| 239 | } |
| 240 | |
| 241 | bool existsFile(const std::string& path) |
| 242 | { |
| 243 | #ifdef _WIN32 |
| 244 | CW2T pszT(CA2W(path.c_str(), CP_UTF8)); |
| 245 | |
| 246 | DWORD dwAttrib = ::GetFileAttributes((LPCTSTR)pszT); |
| 247 | |
| 248 | return (dwAttrib != INVALID_FILE_ATTRIBUTES && |
| 249 | (dwAttrib & FILE_ATTRIBUTE_DIRECTORY) == 0); |
| 250 | #else |
| 251 | struct stat sb; |
| 252 | return (stat(path.c_str(), &sb) == 0); |
| 253 | #endif |
| 254 | } |
| 255 | |
| 256 | bool listSubDirectories(const std::string& path, std::vector<std::string>& subDirectories) |
| 257 | { |
no test coverage detected