| 282 | } |
| 283 | |
| 284 | bool 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 | |
| 307 | bool DefaultFileAccessJobHandler::rename(const FileAccess& destFile) |
| 308 | { |