| 239 | } |
| 240 | |
| 241 | std::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 | |
| 248 | BString Fs::getParentPath(const BString& path) { |
| 249 | return path.substr(0, path.lastIndexOf('/', path.length()-2)); |