| 1964 | } |
| 1965 | |
| 1966 | inline bool is_file(const std::string &path) { |
| 1967 | #ifdef _WIN32 |
| 1968 | return _access_s(path.c_str(), 0) == 0; |
| 1969 | #else |
| 1970 | struct stat st; |
| 1971 | return stat(path.c_str(), &st) >= 0 && S_ISREG(st.st_mode); |
| 1972 | #endif |
| 1973 | } |
| 1974 | |
| 1975 | inline bool is_dir(const std::string &path) { |
| 1976 | struct stat st; |
no test coverage detected