MCPcopy Create free account
hub / github.com/CalcProgrammer1/OpenRGB / is_file

Function is_file

dependencies/httplib/httplib.h:1966–1973  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1964}
1965
1966inline 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
1975inline bool is_dir(const std::string &path) {
1976 struct stat st;

Callers 1

handle_file_requestMethod · 0.85

Calls 1

statClass · 0.70

Tested by

no test coverage detected