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

Method deleteDirectory

src/SFML/Network/Sftp.cpp:1031–1050  ·  view source on GitHub ↗

///////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

1029
1030////////////////////////////////////////////////////////////
1031Sftp::Result Sftp::deleteDirectory(const std::filesystem::path& path, const TimeoutWithPredicate& timeout)
1032{
1033 const auto pathString = pathToUtf8(path);
1034 const auto result = m_impl->waitForOperationComplete(
1035 [&]
1036 {
1037 return libssh2_sftp_rmdir_ex(m_impl->sftpSession.get(),
1038 pathString.data(),
1039 static_cast<unsigned int>(pathString.size()));
1040 },
1041 timeout);
1042
1043 if (result == LIBSSH2_ERROR_EAGAIN)
1044 return Result(Result::Value::Timeout);
1045
1046 if (result < 0)
1047 return makeError(m_impl->ssh2Session.get(), m_impl->sftpSession.get());
1048
1049 return Result(Result::Value::Success);
1050}
1051
1052
1053////////////////////////////////////////////////////////////

Callers

nothing calls this directly

Calls 4

pathToUtf8Function · 0.85
makeErrorFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected