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

Method isDirectory

source/core/StarFile_windows.cpp:71–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71bool File::isDirectory(String const& path) {
72 DWORD attribs = GetFileAttributesW(stringToUtf16(path.trimEnd("\\/")).get());
73 if (attribs == INVALID_FILE_ATTRIBUTES)
74 return false;
75 return attribs & FILE_ATTRIBUTE_DIRECTORY;
76}
77
78String File::fullPath(const String& path) {
79 WCHAR buffer[MAX_PATH];

Callers

nothing calls this directly

Calls 3

stringToUtf16Function · 0.85
trimEndMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected