| 210 | } |
| 211 | |
| 212 | void moveFile(const Path& oldPath, const Path& newPath) override |
| 213 | { |
| 214 | AdfMount m(this); |
| 215 | if ((oldPath.size() == 0) || (newPath.size() == 0)) |
| 216 | throw BadPathException(); |
| 217 | |
| 218 | auto* vol = m.mount(); |
| 219 | |
| 220 | changeDirButOne(vol, oldPath); |
| 221 | auto oldDir = vol->curDirPtr; |
| 222 | |
| 223 | changeDirButOne(vol, newPath); |
| 224 | auto newDir = vol->curDirPtr; |
| 225 | |
| 226 | int res = adfRenameEntry(vol, |
| 227 | oldDir, |
| 228 | (char*)oldPath.back().c_str(), |
| 229 | newDir, |
| 230 | (char*)newPath.back().c_str()); |
| 231 | if (res != RC_OK) |
| 232 | throw CannotWriteException(); |
| 233 | } |
| 234 | |
| 235 | void createDirectory(const Path& path) override |
| 236 | { |
nothing calls this directly
no test coverage detected