|
|
struct stat | st_ |
|
int | ret_ = -1 |
◆ FileStat()
| CPPHTTPLIB_NAMESPACE::detail::FileStat::FileStat |
( |
const std::string & | path | ) |
|
|
inline |
284383 {
284384#if defined(_WIN32)
284385 auto wpath = u8string_to_wstring(path.c_str());
284386 ret_ = _wstat(wpath.c_str(), &st_);
284387#else
284388 ret_ = stat(path.c_str(), &st_);
284389#endif
284390}
◆ is_file()
| bool CPPHTTPLIB_NAMESPACE::detail::FileStat::is_file |
( |
| ) |
const |
|
inline |
284391 {
284392 return ret_ >= 0 && S_ISREG(st_.st_mode);
284393}
◆ is_dir()
| bool CPPHTTPLIB_NAMESPACE::detail::FileStat::is_dir |
( |
| ) |
const |
|
inline |
284394 {
284395 return ret_ >= 0 && S_ISDIR(st_.st_mode);
284396}
The documentation for this struct was generated from the following file: