MCPcopy Create free account
hub / github.com/QuiteRSS/quiterss / removePath

Method removePath

src/common/common.cpp:33–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31#endif
32
33bool Common::removePath(const QString &path)
34{
35 bool result = true;
36 QFileInfo info(path);
37 if (info.isDir()) {
38 QDir dir(path);
39 foreach (const QString &entry, dir.entryList(QDir::AllDirs | QDir::Files | QDir::Hidden | QDir::NoDotAndDotDot)) {
40 result &= removePath(dir.absoluteFilePath(entry));
41 }
42 if (!info.dir().rmdir(info.fileName()))
43 return false;
44 } else {
45 result = QFile::remove(path);
46 }
47 return result;
48}
49
50/** @brief Matches domain (assumes both pattern and domain not starting with dot)
51 * @param pattern = domain to be matched

Callers

nothing calls this directly

Calls 3

isDirMethod · 0.80
rmdirMethod · 0.80
fileNameMethod · 0.80

Tested by

no test coverage detected