MCPcopy Create free account
hub / github.com/MaskRay/ccls / normalizeFolder

Function normalizeFolder

src/utils.cc:133–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131}
132
133bool normalizeFolder(std::string &path) {
134 for (auto &[root, real] : g_config->workspaceFolders) {
135 StringRef p(path);
136 if (p.startswith(root))
137 return true;
138 if (p.startswith(real)) {
139 path = root + path.substr(real.size());
140 return true;
141 }
142 }
143 return false;
144}
145
146std::optional<int64_t> lastWriteTime(const std::string &path) {
147 sys::fs::file_status status;

Callers 3

pathFromFileEntryFunction · 0.85
project.ccFile · 0.85
getPathMethod · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected