This commit is contained in:
yhirose committed 2024-09-02 20:38:01 -04:00
1 parent 4f9c6540b2
commit 2514ebc20f
2 files changed
+11 -4

No files matched your search

-4
View File
@@ -2526,12 +2526,8 @@ inline std::string base64_encode(const std::string &in) {
}
inline bool is_file(const std::string &path) {
#ifdef _WIN32
return _access_s(path.c_str(), 0) == 0;
#else
struct stat st;
return stat(path.c_str(), &st) >= 0 && S_ISREG(st.st_mode);
#endif
}
inline bool is_dir(const std::string &path) {