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

Method isFile

source/core/StarFile_unix.cpp:154–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152}
153
154bool File::isFile(String const& path) {
155 struct stat st_buf;
156 int status = stat(path.utf8Ptr(), &st_buf);
157 if (status != 0)
158 return false;
159
160 return S_ISREG(st_buf.st_mode);
161}
162
163bool File::isDirectory(String const& path) {
164 struct stat st_buf;

Callers

nothing calls this directly

Calls 2

statClass · 0.70
utf8PtrMethod · 0.45

Tested by

no test coverage detected