MCPcopy Create free account
hub / github.com/crosspoint-reader/crosspoint-reader / extractFolderPath

Function extractFolderPath

lib/FsHelpers/FsHelpers.cpp:170–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168bool hasCssExtension(std::string_view fileName) { return checkFileExtension(fileName, ".css"); }
169
170std::string extractFolderPath(const std::string& filePath) {
171 const auto lastSlash = filePath.find_last_of('/');
172 if (lastSlash == std::string::npos || lastSlash == 0) {
173 return "/";
174 }
175 return filePath.substr(0, lastSlash);
176}
177
178void sanitizePathComponentForFat32(const char* input, char* output, size_t maxLen) {
179 if (maxLen == 0) {

Callers 4

goToLibraryMethod · 0.85
onEnterMethod · 0.85
loadSiblingImagesMethod · 0.85
loopMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected