1 #ifndef SFTP_CLIENT_H 2 #define SFTP_CLIENT_H 3 4 5 #include <stdio.h> 6 #include <string> 7 8 #include <File.h> 9 #include "SpawningUploadClient.h" 10 11 using std::string; 12 13 14 class SftpClient : public SpawningUploadClient { 15 public: 16 SftpClient(); 17 ~SftpClient(); 18 19 virtual bool Connect(const string& server, const string& login, 20 const string& passwd); 21 22 bool PutFile(const string& local, const string& remote, 23 ftp_mode mode = binary_mode); 24 25 bool GetFile(const string& remote, const string& local, 26 ftp_mode mode = binary_mode); 27 28 bool MoveFile(const string& oldPath, const string& newPath); 29 bool ChangeDir(const string& dir); 30 bool PrintWorkingDir(string& dir); 31 bool ListDirContents(string& listing); 32 bool Chmod(const string& path, const string& mod); 33 34 void SetPassive(bool on); 35 36 protected: 37 38 }; 39 40 #endif // SFTP_CLIENT_H 41