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

Method deleteFile

lib/vfs/roland.cc:205–225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203 }
204
205 void deleteFile(const Path& path) override
206 {
207 mount();
208 if (path.size() != 1)
209 throw BadPathException();
210
211 auto de = findFile(path.front());
212 for (uint8_t b : de->blocks)
213 freeBlock(b);
214
215 for (auto it = _dirents.begin(); it != _dirents.end(); it++)
216 {
217 if (*it == de)
218 {
219 _dirents.erase(it);
220 break;
221 }
222 }
223
224 rewriteDirectory();
225 }
226
227 void moveFile(const Path& oldName, const Path& newName) override
228 {

Callers

nothing calls this directly

Calls 5

BadPathExceptionClass · 0.85
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected