This class provides methods for manipulating the FTP protocol (described in RFC 959). More...
#include <Ftp.hpp>
Classes | |
class | DataChannel |
class | DirectoryResponse |
Specialization of FTP response returning a directory. More... | |
class | ListingResponse |
Specialization of FTP response returning a filename lisiting. More... | |
class | Response |
This class wraps a FTP response, which is basically : More... | |
Public Types | |
enum | TransferMode { Binary, Ascii, Ebcdic } |
Enumeration of transfer modes. More... | |
Public Member Functions | |
~Ftp () | |
Destructor – close the connection with the server. More... | |
Response | Connect (const IPAddress &Server, unsigned short Port=21, float Timeout=0.f) |
Connect to the specified FTP server. More... | |
Response | Login () |
Log in using anonymous account. More... | |
Response | Login (const std::string &UserName, const std::string &Password) |
Log in using a username and a password. More... | |
Response | Disconnect () |
Close the connection with FTP server. More... | |
Response | KeepAlive () |
Send a null command just to prevent from being disconnected. More... | |
DirectoryResponse | GetWorkingDirectory () |
Get the current working directory. More... | |
ListingResponse | GetDirectoryListing (const std::string &Directory="") |
Get the contents of the given directory (subdirectories and files) More... | |
Response | ChangeDirectory (const std::string &Directory) |
Change the current working directory. More... | |
Response | ParentDirectory () |
Go to the parent directory of the current one. More... | |
Response | MakeDirectory (const std::string &Name) |
Create a new directory. More... | |
Response | DeleteDirectory (const std::string &Name) |
Remove an existing directory. More... | |
Response | RenameFile (const std::string &File, const std::string &NewName) |
Rename a file. More... | |
Response | DeleteFile (const std::string &Name) |
Remove an existing file. More... | |
Response | Download (const std::string &DistantFile, const std::string &DestPath, TransferMode Mode=Binary) |
Download a file from the server. More... | |
Response | Upload (const std::string &LocalFile, const std::string &DestPath, TransferMode Mode=Binary) |
Upload a file to the server. More... | |
Friends | |
class | DataChannel |
This class provides methods for manipulating the FTP protocol (described in RFC 959).
It provides easy access and transfers to remote directories and files on a FTP server
sf::Ftp::~Ftp | ( | ) |
Ftp::Response sf::Ftp::ChangeDirectory | ( | const std::string & | Directory | ) |
Ftp::Response sf::Ftp::Connect | ( | const IPAddress & | Server, |
unsigned short | Port = 21 , |
||
float | Timeout = 0.f |
||
) |
Ftp::Response sf::Ftp::DeleteDirectory | ( | const std::string & | Name | ) |
Ftp::Response sf::Ftp::DeleteFile | ( | const std::string & | Name | ) |
Ftp::Response sf::Ftp::Disconnect | ( | ) |
Ftp::Response sf::Ftp::Download | ( | const std::string & | DistantFile, |
const std::string & | DestPath, | ||
TransferMode | Mode = Binary |
||
) |
Ftp::ListingResponse sf::Ftp::GetDirectoryListing | ( | const std::string & | Directory = "" | ) |
Ftp::DirectoryResponse sf::Ftp::GetWorkingDirectory | ( | ) |
Ftp::Response sf::Ftp::KeepAlive | ( | ) |
Ftp::Response sf::Ftp::Login | ( | ) |
Ftp::Response sf::Ftp::Login | ( | const std::string & | UserName, |
const std::string & | Password | ||
) |
Ftp::Response sf::Ftp::MakeDirectory | ( | const std::string & | Name | ) |
Ftp::Response sf::Ftp::ParentDirectory | ( | ) |
Ftp::Response sf::Ftp::RenameFile | ( | const std::string & | File, |
const std::string & | NewName | ||
) |
Ftp::Response sf::Ftp::Upload | ( | const std::string & | LocalFile, |
const std::string & | DestPath, | ||
TransferMode | Mode = Binary |
||
) |