MCPcopy Create free account
hub / github.com/SFML/SFML / checkResult

Function checkResult

examples/sftp/Sftp.cpp:24–37  ·  view source on GitHub ↗

Check an SFTP result and print the error message if necessary

Source from the content-addressed store, hash-verified

22
23// Check an SFTP result and print the error message if necessary
24bool 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
40std::ostream& operator<<(std::ostream& stream, std::filesystem::perms permissions)

Callers 1

mainFunction · 0.85

Calls 2

isOkMethod · 0.45
getValueMethod · 0.45

Tested by

no test coverage detected