MCPcopy Create free account
hub / github.com/CppMicroServices/CppMicroServices / IsFile

Function IsFile

util/src/FileSystem.cpp:270–287  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

268 }
269
270 bool
271 IsFile(std::string const& path)
272 {
273 US_STAT s;
274 errno = 0;
275 if (us_stat(path.c_str(), &s))
276 {
277 if (not_found_c_error(errno))
278 {
279 return false;
280 }
281 else
282 {
283 throw std::invalid_argument(GetLastCErrorStr());
284 }
285 }
286 return S_ISREG(s.st_mode);
287 }
288
289 bool
290 IsRelative(std::string const& path)

Callers 1

TEST_FFunction · 0.85

Calls 2

not_found_c_errorFunction · 0.85
GetLastCErrorStrFunction · 0.85

Tested by 1

TEST_FFunction · 0.68