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

Method getFile

lib/vfs/acorndfs.cc:152–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150 }
151
152 Bytes getFile(const Path& path) override
153 {
154 AcornDfsDirectory dir(this);
155 auto dirent = dir.findFile(path);
156 int sectors = (dirent->length + 255) / 256;
157
158 Bytes data;
159 ByteWriter bw(data);
160 for (int i = 0; i < sectors; i++)
161 {
162 auto sector = getLogicalSector(dirent->start_sector + i);
163 bw.append(sector);
164 }
165
166 data.resize(dirent->length);
167 return data;
168 }
169
170 std::shared_ptr<Dirent> getDirent(const Path& path) override
171 {

Callers

nothing calls this directly

Calls 2

findFileMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected