MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / getFile

Method getFile

lib/vfs/microdos.cc:149–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147 }
148
149 Bytes getFile(const Path& path) override
150 {
151 mount();
152 if (path.size() != 1)
153 throw BadPathException();
154
155 auto dirent = findFile(path.front());
156
157 Bytes data;
158 ByteWriter bw(data);
159 for (const auto& sdw : dirent->sdws)
160 bw += getLogicalSector(sdw.start, sdw.length);
161
162 return data.slice(512);
163 }
164
165private:
166 void mount()

Callers

nothing calls this directly

Calls 3

BadPathExceptionClass · 0.85
sliceMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected