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

Method addVirtualFile

source/io/fs.cpp:103–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103std::shared_ptr<FsNode> Fs::addVirtualFile(const BString& path, std::function<FsOpenNode* (const std::shared_ptr<FsNode>& node, U32 flags, U32 data)> func, U32 mode, U32 rdev, const std::shared_ptr<FsNode>& parent, U32 data) {
104 std::shared_ptr<FsNode> result = std::make_shared<FsVirtualNode>(Fs::nextNodeId++, rdev, path, func, mode, parent, data);
105 parent->addChild(result);
106 return result;
107}
108
109std::shared_ptr<FsNode> Fs::addVirtualFile(const BString& path, U32 mode, U32 rdev, const std::shared_ptr<FsNode>& parent, const BString& value) {
110 std::shared_ptr<FsNode> result = std::make_shared<FsVirtualNode>(Fs::nextNodeId++, rdev, path, [value](const std::shared_ptr<FsNode>& node, U32 flags, U32 data) {

Callers

nothing calls this directly

Calls 1

addChildMethod · 0.80

Tested by

no test coverage detected