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

Method stat

extensions/sftp/client/SFTPClient.cpp:732–743  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

730}
731
732bool SFTPClient::stat(const std::string& path, bool follow_symlinks, LIBSSH2_SFTP_ATTRIBUTES& result) {
733 if (libssh2_sftp_stat_ex(sftp_session_,
734 path.c_str(),
735 path.length(),
736 follow_symlinks ? LIBSSH2_SFTP_STAT : LIBSSH2_SFTP_LSTAT,
737 &result) != 0) {
738 last_error_.setLibssh2Error(libssh2_sftp_last_error(sftp_session_));
739 logger_->log_debug("Failed to stat remote path \"%s\", error: %s", path.c_str(), sftp_strerror(last_error_));
740 return false;
741 }
742 return true;
743}
744
745bool SFTPClient::setAttributes(const std::string& path, const SFTPAttributes& input) {
746 LIBSSH2_SFTP_ATTRIBUTES attrs;

Callers 4

listDirectoryMethod · 0.95
setAttributesMethod · 0.95
processOneMethod · 0.80

Calls 4

sftp_strerrorFunction · 0.85
c_strMethod · 0.80
lengthMethod · 0.80
log_debugMethod · 0.80

Tested by

no test coverage detected