MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / isDirectory

Method isDirectory

source/core/StarFile_unix.cpp:163–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

161}
162
163bool File::isDirectory(String const& path) {
164 struct stat st_buf;
165 int status = stat(path.utf8Ptr(), &st_buf);
166 if (status != 0)
167 return false;
168
169 return S_ISDIR(st_buf.st_mode);
170}
171
172void File::remove(String const& filename) {
173 if (::remove(filename.utf8Ptr()) < 0)

Callers

nothing calls this directly

Calls 2

statClass · 0.70
utf8PtrMethod · 0.45

Tested by

no test coverage detected