| 2086 | } |
| 2087 | |
| 2088 | inline bool is_file(const std::string &path) { |
| 2089 | #ifdef _WIN32 |
| 2090 | return _access_s(path.c_str(), 0) == 0; |
| 2091 | #else |
| 2092 | struct stat st; |
| 2093 | return stat(path.c_str(), &st) >= 0 && S_ISREG(st.st_mode); |
| 2094 | #endif |
| 2095 | } |
| 2096 | |
| 2097 | inline bool is_dir(const std::string &path) { |
| 2098 | struct stat st; |
no test coverage detected