| 276 | } |
| 277 | |
| 278 | int CChannelSFTP::RemoveFile(const QString &file) |
| 279 | { |
| 280 | // 删除文件 |
| 281 | int ret = sftp_unlink(m_SessionSftp, file.toStdString().c_str()); |
| 282 | if (ret != SSH_OK) { |
| 283 | QString szErr = "Can't remove file:" + file + ssh_get_error(m_Session); |
| 284 | qCritical(log) << szErr; |
| 285 | emit sigError(ret, szErr); |
| 286 | } else { |
| 287 | qDebug(log) << "Removed file:" << file; |
| 288 | } |
| 289 | return ret; |
| 290 | } |
| 291 | |
| 292 | int CChannelSFTP::Rename(const QString &oldPath, const QString &newPath) |
| 293 | { |