ultimatepp/reference/SshBasics/SFtp.cpp
oblivion 36804053e3 SshBasics (a reference example set for the SSH package) is added, and SFtpGet & SshExec examples are removed.
git-svn-id: svn://ultimatepp.org/upp/trunk@12171 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2018-08-17 20:14:36 +00:00

13 lines
No EOL
267 B
C++

#include "SshBasics.h"
// SFtpGet:
// Demonstrates a file download, using sftp.
void SFtpGet(SshSession& session)
{
const char *path = "/readme.txt";
SFtp sftp(session);
String file = sftp.LoadFile(path);
LOG((!sftp.IsError() ? file : sftp.GetErrorDesc()));
}