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

Method addDynamicLinkFile

source/io/fs.cpp:117–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115}
116
117std::shared_ptr<FsNode> Fs::addDynamicLinkFile(const BString& path, U32 rdev, const std::shared_ptr<FsNode>& parent, bool isDirectory, const BString& link) {
118 std::shared_ptr<FsNode> result = std::make_shared<FsDynamicLinkNode>(Fs::nextNodeId++, rdev, path, parent, isDirectory, [link]() {
119 return link;
120 });
121 parent->addChild(result);
122 return result;
123}
124
125std::shared_ptr<FsNode> Fs::addDynamicLinkFile(const BString& path, U32 rdev, const std::shared_ptr<FsNode>& parent, bool isDirectory, std::function<BString(void)> fnGetLink) {
126 std::shared_ptr<FsNode> result = std::make_shared<FsDynamicLinkNode>(Fs::nextNodeId++, rdev, path, parent, isDirectory, fnGetLink);

Callers

nothing calls this directly

Calls 1

addChildMethod · 0.80

Tested by

no test coverage detected