MCPcopy Create free account
hub / github.com/KDE/kdevelop / deleteDataDirectory

Method deleteDataDirectory

kdevplatform/serialization/itemrepositoryregistry.cpp:258–269  ·  view source on GitHub ↗

After calling this, the data-directory may be a new one

Source from the content-addressed store, hash-verified

256
257//After calling this, the data-directory may be a new one
258void ItemRepositoryRegistryPrivate::deleteDataDirectory(bool recreate)
259{
260 QMutexLocker lock(&m_mutex);
261
262 bool result = QDir(m_path).removeRecursively();
263 Q_ASSERT(result);
264 Q_UNUSED(result);
265 // Just recreate the directory then; leave old path (as it is dependent on appname and session only).
266 if (recreate) {
267 QDir().mkpath(m_path);
268 }
269}
270
271ItemRepositoryRegistryPrivate::ItemRepositoryRegistryPrivate(const QString& path)
272 : m_path(path)

Callers 2

registerRepositoryMethod · 0.80
shutdownMethod · 0.80

Calls 2

removeRecursivelyMethod · 0.80
QDirClass · 0.50

Tested by

no test coverage detected