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

Method addRootDirectoryNode

source/io/fs.cpp:241–246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239}
240
241std::shared_ptr<FsNode> Fs::addRootDirectoryNode(const BString& path, const BString& nativePath, const std::shared_ptr<FsNode>& parent) {
242 std::shared_ptr<FsFileNode> result = std::make_shared<FsFileNode>(Fs::nextNodeId++, 0, path, B(""), nativePath, true, false, parent);
243 parent->addChild(result);
244 result->isRootPath = true;
245 return result;
246}
247
248BString Fs::getParentPath(const BString& path) {
249 return path.substr(0, path.lastIndexOf('/', path.length()-2));

Callers

nothing calls this directly

Calls 2

BFunction · 0.85
addChildMethod · 0.80

Tested by

no test coverage detected