MCPcopy Create free account
hub / github.com/Project-LemonLime/Project_LemonLime / copyPath

Function copyPath

src/lemon.cpp:285–307  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

283}
284
285void copyPath(const QString &fromPath, const QString &toPath) {
286 QDir dir(fromPath);
287
288 if (! dir.exists())
289 return;
290
291 QString fpath = fromPath + QDir::separator();
292 QString tpath = toPath + QDir::separator();
293 dir.setFilter(QDir::AllEntries | QDir::NoDotAndDotDot | QDir::Hidden);
294
295 for (const auto &fi : dir.entryInfoList()) {
296 QString fn = fpath + fi.fileName();
297 QString tn = tpath + fi.fileName();
298
299 if (fi.isFile() || fi.isSymLink())
300 QFile::copy(fn, tn);
301 else {
302 QDir toDir(toPath);
303 toDir.mkpath(fi.fileName());
304 copyPath(fn, tn);
305 }
306 }
307}
308
309void LemonLime::cleanupButtonClicked() {
310 QString text;

Callers 1

cleanupButtonClickedMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected