MCPcopy Create free account
hub / github.com/MemNixFS/MemNixFS / SizedLazyFileNode

Method SizedLazyFileNode

src/vfs/vfs.h:177–183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175public:
176 using SizeFn = std::function<u64()>;
177 SizedLazyFileNode(std::string name, SizeFn size_fn, FileProducer p,
178 FileCost cost = {})
179 : Node(std::move(name), Kind::File)
180 , size_fn_(std::move(size_fn))
181 , producer_(std::move(p)) {
182 cost_ = cost;
183 }
184 u64 size() override;
185 // size() is already cheap here (uses size_fn_), so the default
186 // size_hint()==size() is fine — no override needed.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected