MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / directoryExists

Function directoryExists

src/backend/common/util.cpp:167–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165#endif
166
167bool directoryExists(const string& path) {
168#if defined(OS_WIN)
169 struct _stat status;
170 return _stat(path.c_str(), &status) == 0 && (status.st_mode & S_IFDIR) != 0;
171#else
172 struct stat status {};
173 // NOLINTNEXTLINE(hicpp-signed-bitwise)
174 return stat(path.c_str(), &status) == 0 && (status.st_mode & S_IFDIR) != 0;
175#endif
176}
177
178bool createDirectory(const string& path) {
179#if defined(OS_WIN)

Callers 1

isDirectoryWritableFunction · 0.85

Calls 2

_statClass · 0.85
statClass · 0.85

Tested by

no test coverage detected