| 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 | { |
nothing calls this directly
no test coverage detected