MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / getFullPath

Method getFullPath

source/io/fs.cpp:135–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133}
134
135BString Fs::getFullPath(const BString& currentDirectory, const BString& path) {
136 BString fullpath;
137
138 if (path.startsWith("/"))
139 fullpath = path;
140 else
141 fullpath = currentDirectory+"/"+path;
142 if (fullpath.endsWith("/."))
143 fullpath = fullpath.substr(0, fullpath.length()-2);
144 fullpath.replace("//", "/");
145 return fullpath;
146}
147
148bool cleanPath(std::vector<BString>& parts) {
149 for (U32 i=0;i<parts.size();) {

Callers

nothing calls this directly

Calls 5

startsWithMethod · 0.80
endsWithMethod · 0.80
substrMethod · 0.80
replaceMethod · 0.80
lengthMethod · 0.45

Tested by

no test coverage detected