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

Method symLink

src/DefaultFileAccessJobHandler.cpp:284–305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

282}
283
284bool DefaultFileAccessJobHandler::symLink(const QUrl& linkTarget, const QUrl& linkLocation)
285{
286 if(linkTarget.isEmpty() || linkLocation.isEmpty())
287 return false;
288 else
289 {
290 m_bSuccess = false;
291#if HAS_KFKIO
292 KIO::CopyJob* pJob = KIO::link(linkTarget, linkLocation, KIO::HideProgressInfo);
293 chk_connect(pJob, &KIO::CopyJob::result, this, &DefaultFileAccessJobHandler::slotSimpleJobResult);
294 chk_connect(pJob, &KIO::CopyJob::finished, this, &DefaultFileAccessJobHandler::slotJobEnded);
295
296 ProgressProxy::enterEventLoop(pJob,
297 i18n("Creating symbolic link: %1 -> %2", FileAccess::prettyAbsPath(linkLocation), FileAccess::prettyAbsPath(linkTarget)));
298#else
299 //TODO: Not implemented.
300 //if(FileAccess::isLocal(fileName))
301 // m_bSuccess = QFile::link(linkTarget, linkLocation)
302#endif
303 return m_bSuccess;
304 }
305}
306
307bool DefaultFileAccessJobHandler::rename(const FileAccess& destFile)
308{

Callers

nothing calls this directly

Calls 1

isEmptyMethod · 0.45

Tested by

no test coverage detected