MCPcopy Create free account
hub / github.com/OpenBangla/OpenBangla-Keyboard / migrateFile

Function migrateFile

src/shared/FileSystem.cpp:59–68  ·  view source on GitHub ↗

Copy the `fileName` from `src` to `dst`. This function overwrites if the file already exists in the destination.

Source from the content-addressed store, hash-verified

57/// Copy the `fileName` from `src` to `dst`.
58/// This function overwrites if the file already exists in the destination.
59bool migrateFile(const QString &fileName, const QDir &src, const QDir &dst) {
60 QString srcFile = src.filePath(fileName);
61 QString dstFile = dst.filePath(fileName);
62
63 if(QFile::exists(srcFile) && QFile::exists(dstFile)) {
64 QFile::remove(dstFile);
65 }
66
67 return QFile::copy(srcFile, dstFile);
68}

Callers 1

DataMigrationMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected