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

Method moveFile

lib/vfs/amigaffs.cc:212–233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 5

BadPathExceptionClass · 0.85
adfRenameEntryFunction · 0.85
sizeMethod · 0.45
mountMethod · 0.45

Tested by

no test coverage detected