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

Function IsDirectory

util/src/FileSystem.cpp:251–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

249 }
250
251 bool
252 IsDirectory(std::string const& path)
253 {
254 US_STAT s;
255 errno = 0;
256 if (us_stat(path.c_str(), &s))
257 {
258 if (not_found_c_error(errno))
259 {
260 return false;
261 }
262 else
263 {
264 throw std::invalid_argument(GetLastCErrorStr());
265 }
266 }
267 return S_ISDIR(s.st_mode);
268 }
269
270 bool
271 IsFile(std::string const& path)

Callers 3

TEST_FFunction · 0.85
GetPersistentStoragePathFunction · 0.85
RemoveDirectoryRecursiveFunction · 0.85

Calls 2

not_found_c_errorFunction · 0.85
GetLastCErrorStrFunction · 0.85

Tested by 1

TEST_FFunction · 0.68