MCPcopy Create free account
hub / github.com/Selectively11/CloudRedirect / copyDir

Function copyDir

ui-linux/src/backend.cpp:31–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29static const char* ONEDRIVE_CLIENT_SECRET = "qtyfaBBYA403=unZUP40~_#";
30
31static void copyDir(const QString &src, const QString &dst, QJsonArray &undoOps, uint appId)
32{
33 QDir().mkpath(dst);
34 QDirIterator it(src, QDir::Files | QDir::NoDotAndDotDot, QDirIterator::Subdirectories);
35 while (it.hasNext()) {
36 it.next();
37 QString relPath = QDir(src).relativeFilePath(it.filePath());
38 QString dstPath = dst + "/" + relPath;
39 QDir().mkpath(QFileInfo(dstPath).absolutePath());
40 if (!QFile::copy(it.filePath(), dstPath))
41 continue; // Skip failed copies - don't record in undo log
42
43 QJsonObject op;
44 op["type"] = "file_copy";
45 op["source"] = it.filePath();
46 op["dest"] = dstPath;
47 op["appId"] = (int)appId;
48 undoOps.append(op);
49 }
50}
51
52static QString backupRootForAccount(const QString &accountId)
53{

Callers 1

deleteAppDataMethod · 0.85

Calls 1

nextMethod · 0.80

Tested by

no test coverage detected