MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / ClassifyPathPart

Function ClassifyPathPart

system/lib/libcxx/src/filesystem/path.cpp:144–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142enum PathPartKind : unsigned char { PK_None, PK_RootSep, PK_Filename, PK_Dot, PK_DotDot, PK_TrailingSep };
143
144static PathPartKind ClassifyPathPart(string_view_t Part) {
145 if (Part.empty())
146 return PK_TrailingSep;
147 if (Part == PATHSTR("."))
148 return PK_Dot;
149 if (Part == PATHSTR(".."))
150 return PK_DotDot;
151 if (Part == PATHSTR("/"))
152 return PK_RootSep;
153#if defined(_LIBCPP_WIN32API)
154 if (Part == PATHSTR("\\"))
155 return PK_RootSep;
156#endif
157 return PK_Filename;
158}
159
160path path::lexically_normal() const {
161 if (__pn_.empty())

Callers 1

lexically_normalMethod · 0.85

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected