MCPcopy Create free account
hub / github.com/crownengine/crown / is_root

Function is_root

src/core/filesystem/path.cpp:51–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49 }
50
51 bool is_root(const char *path)
52 {
53 CE_ENSURE(NULL != path);
54#if CROWN_PLATFORM_WINDOWS
55 return is_absolute(path)
56 && ((strlen(path) == 2 && path[0] == '/') || strlen32(path) == 3 && isalpha(path[0]));
57#else
58 return is_absolute(path) && strlen32(path) == 1;
59#endif
60 }
61
62 void join(DynamicString &path, const StringView &path_a, const StringView &path_b)
63 {

Callers 1

test_pathFunction · 0.85

Calls 2

is_absoluteFunction · 0.85
strlenFunction · 0.85

Tested by 1

test_pathFunction · 0.68