#include <FTP.hpp>
Inheritance diagram for sfFTP:
Public Types | |
enum | TransferMode { Binary, Ascii, Ebcdic } |
Public Member Functions | |
sfFTP (Listener *FTPListener=NULL) | |
~sfFTP () | |
bool | Connect (const sfIPAddress &Server, unsigned int Port=21) |
bool | Login (const std::string &UserName, const std::string &Password) |
bool | Disconnect () |
bool | KeepAlive () |
bool | GetWorkingDirectory (std::string &Directory) |
bool | GetDirectoryListing (std::vector< std::string > &Listing, const std::string &Directory="") |
bool | ChangeDirectory (const std::string &Directory) |
bool | ParentDirectory () |
bool | MakeDirectory (const std::string &Name) |
bool | DeleteDirectory (const std::string &Name) |
bool | RenameFile (const std::string &File, const std::string &NewName) |
bool | RemoveFile (const std::string &Name) |
bool | Download (const std::string &DistantFile, const std::string &DestPath, TransferMode Mode=Binary) |
bool | Upload (const std::string &LocalFile, const std::string &DestPath, TransferMode Mode=Binary) |
Classes | |
class | DataChannel |
class | Listener |
Definition at line 41 of file FTP.hpp.
enum sfFTP::TransferMode |
sfFTP::sfFTP | ( | Listener * | FTPListener = NULL |
) |
sfFTP::~sfFTP | ( | ) |
bool sfFTP::Connect | ( | const sfIPAddress & | Server, | |
unsigned int | Port = 21 | |||
) |
Connect to the specified FTP server
Server | : FTP server IP address | |
Port | : Port used for connection (21 by default) |
Definition at line 58 of file FTP.cpp.
References sfSocketTCP::Connect(), and sfIPAddress::IsValid().
bool sfFTP::Login | ( | const std::string & | UserName, | |
const std::string & | Password | |||
) |
bool sfFTP::Disconnect | ( | ) |
Close the connection with FTP server
Definition at line 92 of file FTP.cpp.
References sfSocketTCP::Close().
Referenced by ~sfFTP().
bool sfFTP::KeepAlive | ( | ) |
bool sfFTP::GetWorkingDirectory | ( | std::string & | Directory | ) |
bool sfFTP::GetDirectoryListing | ( | std::vector< std::string > & | Listing, | |
const std::string & | Directory = "" | |||
) |
Get the contents of the given directory (subdirectories and files)
Listing | : Array of strings to fill with the directory listing | |
Directory | : Directory to list ("" by default, the current one) |
Definition at line 137 of file FTP.cpp.
References Ascii.
bool sfFTP::ChangeDirectory | ( | const std::string & | Directory | ) |
bool sfFTP::ParentDirectory | ( | ) |
bool sfFTP::MakeDirectory | ( | const std::string & | Name | ) |
bool sfFTP::DeleteDirectory | ( | const std::string & | Name | ) |
bool sfFTP::RenameFile | ( | const std::string & | File, | |
const std::string & | NewName | |||
) |
bool sfFTP::RemoveFile | ( | const std::string & | Name | ) |
bool sfFTP::Download | ( | const std::string & | DistantFile, | |
const std::string & | DestPath, | |||
TransferMode | Mode = Binary | |||
) |
bool sfFTP::Upload | ( | const std::string & | LocalFile, | |
const std::string & | DestPath, | |||
TransferMode | Mode = Binary | |||
) |