MCPcopy Create free account
hub / github.com/KDE/kdiff3 / removeFile

Method removeFile

src/DefaultFileAccessJobHandler.cpp:263–282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

261}
262
263bool DefaultFileAccessJobHandler::removeFile(const QUrl& fileName)
264{
265 if(fileName.isEmpty())
266 return false;
267 else
268 {
269 m_bSuccess = false;
270#if HAS_KFKIO
271 KIO::SimpleJob* pJob = KIO::file_delete(fileName, KIO::HideProgressInfo);
272 chk_connect(pJob, &KIO::SimpleJob::result, this, &DefaultFileAccessJobHandler::slotSimpleJobResult);
273 chk_connect(pJob, &KIO::SimpleJob::finished, this, &DefaultFileAccessJobHandler::slotJobEnded);
274
275 ProgressProxy::enterEventLoop(pJob, i18nc("Message for progress dialog %1 = path to file", "Removing file: %1", FileAccess::prettyAbsPath(fileName)));
276#else
277 if(FileAccess::isLocal(fileName))
278 m_bSuccess = QFile::remove(fileName)
279#endif
280 return m_bSuccess;
281 }
282}
283
284bool DefaultFileAccessJobHandler::symLink(const QUrl& linkTarget, const QUrl& linkLocation)
285{

Callers

nothing calls this directly

Calls 1

isEmptyMethod · 0.45

Tested by

no test coverage detected