MCPcopy Create free account
hub / github.com/FreesmTeam/FreesmLauncher / move

Function move

launcher/FileSystem.cpp:666–681  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

664}
665
666bool move(const QString& source, const QString& dest)
667{
668 std::error_code err;
669
670 ensureFilePathExists(dest);
671 fs::rename(StringUtils::toStdString(source), StringUtils::toStdString(dest), err);
672
673 if (err.value() != 0) {
674 if (moveByCopy(source, dest))
675 return true;
676 qDebug() << "Move of" << source << "to" << dest << "failed!";
677 qWarning() << "Failed to move file:" << QString::fromStdString(err.message()) << QString::number(err.value());
678 return false;
679 }
680 return true;
681}
682
683bool deletePath(QString path)
684{

Callers 15

InstanceNameMethod · 0.85
VersionMethod · 0.85
ApplicationMethod · 0.85
setTargetToJoinMethod · 0.85
setAccountToUseMethod · 0.85
ResourceDownloadTaskMethod · 0.85
SectionMethod · 0.85
InstanceStagingMethod · 0.85
commitStagedInstanceMethod · 0.85
setOutputAddressPtrMethod · 0.85
getUpdatableMethod · 0.85
getDependenciesMethod · 0.85

Calls 5

ensureFilePathExistsFunction · 0.85
toStdStringFunction · 0.85
moveByCopyFunction · 0.85
fromStdStringFunction · 0.85
valueMethod · 0.80

Tested by

no test coverage detected