Check an SFTP result and print the error message if necessary
| 22 | |
| 23 | // Check an SFTP result and print the error message if necessary |
| 24 | bool checkResult(const sf::Sftp::Result& result) |
| 25 | { |
| 26 | if (result.isOk()) |
| 27 | return true; |
| 28 | if ((result.getValue() == sf::Sftp::Result::Value::Timeout) && interrupt) |
| 29 | { |
| 30 | std::cout << "Interrupted" << std::endl; |
| 31 | } |
| 32 | else |
| 33 | { |
| 34 | std::cout << "Operation failed: " << result.getMessage() << std::endl; |
| 35 | } |
| 36 | return false; |
| 37 | } |
| 38 | |
| 39 | // Stream output operator for filesystem permissions |
| 40 | std::ostream& operator<<(std::ostream& stream, std::filesystem::perms permissions) |