| 262 | } |
| 263 | |
| 264 | void removePath(const QString &path) { |
| 265 | if (path.isEmpty()) |
| 266 | return; |
| 267 | |
| 268 | QDir dir(path); |
| 269 | |
| 270 | if (! dir.exists()) |
| 271 | return; |
| 272 | |
| 273 | dir.setFilter(QDir::AllEntries | QDir::NoDotAndDotDot | QDir::Hidden); |
| 274 | |
| 275 | for (const auto &fi : dir.entryInfoList()) { |
| 276 | if (fi.isFile() || fi.isSymLink()) |
| 277 | fi.dir().remove(fi.fileName()); |
| 278 | else |
| 279 | removePath(fi.absoluteFilePath()); |
| 280 | } |
| 281 | |
| 282 | dir.rmpath(dir.absolutePath()); |
| 283 | } |
| 284 | |
| 285 | void copyPath(const QString &fromPath, const QString &toPath) { |
| 286 | QDir dir(fromPath); |
no outgoing calls
no test coverage detected