mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-15 01:08:27 +00:00
Fix #1848
This commit is contained in:
parent
4f9c6540b2
commit
2514ebc20f
2 changed files with 11 additions and 4 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue