MCPcopy Create free account
hub / github.com/apache/nifi-minifi-cpp / removeFile

Method removeFile

extensions/sftp/client/SFTPClient.cpp:667–674  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

665}
666
667bool SFTPClient::removeFile(const std::string& path) {
668 if (libssh2_sftp_unlink(sftp_session_, path.c_str()) != 0) {
669 last_error_.setLibssh2Error(libssh2_sftp_last_error(sftp_session_));
670 logger_->log_error("Failed to remove remote file \"%s\", error: %s", path.c_str(), sftp_strerror(last_error_));
671 return false;
672 }
673 return true;
674}
675
676bool SFTPClient::removeDirectory(const std::string& path) {
677 if (libssh2_sftp_rmdir(sftp_session_, path.c_str()) != 0) {

Callers 3

renameMethod · 0.95
processOneMethod · 0.80
onTriggerMethod · 0.80

Calls 3

sftp_strerrorFunction · 0.85
c_strMethod · 0.80
log_errorMethod · 0.80

Tested by

no test coverage detected