Loading...
Searching...
No Matches
Ftp.hpp
Go to the documentation of this file.
7// In no event will the authors be held liable for any damages arising from the use of this software.
78 RestartMarkerReply = 110,
79 ServiceReadySoon = 120,
80 DataConnectionAlreadyOpened = 125,
81 OpeningDataConnection = 150,
84 Ok = 200,
85 PointlessCommand = 202,
86 SystemStatus = 211,
87 DirectoryStatus = 212,
88 FileStatus = 213,
89 HelpMessage = 214,
90 SystemType = 215,
91 ServiceReady = 220,
92 ClosingConnection = 221,
93 DataConnectionOpened = 225,
94 ClosingDataConnection = 226,
95 EnteringPassiveMode = 227,
96 LoggedIn = 230,
97 FileActionOk = 250,
98 DirectoryOk = 257,
102 NeedPassword = 331,
103 NeedAccountToLogIn = 332,
104 NeedInformation = 350,
108 ServiceUnavailable = 421,
109 DataConnectionUnavailable = 425,
110 TransferAborted = 426,
111 FileActionAborted = 450,
112 LocalError = 451,
113 InsufficientStorageSpace = 452,
117 CommandUnknown = 500,
118 ParametersUnknown = 501,
119 CommandNotImplemented = 502,
120 BadCommandSequence = 503,
121 ParameterNotImplemented = 504,
122 NotLoggedIn = 530,
123 NeedAccountToStore = 532,
124 FileUnavailable = 550,
125 PageTypeUnknown = 551,
126 NotEnoughMemory = 552,
127 FilenameNotAllowed = 553,
130 InvalidResponse = 1000,
131 ConnectionFailed = 1001,
132 ConnectionClosed = 1002,
134 };
468 Response download(const std::string& remoteFile, const std::string& localPath, TransferMode mode = Binary);
491 Response upload(const std::string& localFile, const std::string& remotePath, TransferMode mode = Binary, bool append = false);
Specialization of FTP response returning a directory.
Definition Ftp.hpp:189
DirectoryResponse(const Response &response)
Default constructor.
const std::string & getDirectory() const
Get the directory returned in the response.
Specialization of FTP response returning a filename listing.
Definition Ftp.hpp:222
const std::vector< std::string > & getListing() const
Return the array of directory/file names.
ListingResponse(const Response &response, const std::string &data)
Default constructor.
const std::string & getMessage() const
Get the full message contained in the response.
Response(Status code=InvalidResponse, const std::string &message="")
Default constructor.
Response upload(const std::string &localFile, const std::string &remotePath, TransferMode mode=Binary, bool append=false)
Upload a file to the server.
Response download(const std::string &remoteFile, const std::string &localPath, TransferMode mode=Binary)
Download a file from the server.
Response deleteDirectory(const std::string &name)
Remove an existing directory.
Response sendCommand(const std::string &command, const std::string ¶meter="")
Send a command to the FTP server.
DirectoryResponse getWorkingDirectory()
Get the current working directory.
Response changeDirectory(const std::string &directory)
Change the current working directory.
ListingResponse getDirectoryListing(const std::string &directory="")
Get the contents of the given directory.
Response renameFile(const std::string &file, const std::string &newName)
Rename an existing file.
Response login(const std::string &name, const std::string &password)
Log in using a username and a password.
Response connect(const IpAddress &server, unsigned short port=21, Time timeout=Time::Zero)
Connect to the specified FTP server.
Utility class that makes any derived class non-copyable.
Definition NonCopyable.hpp:42
Definition AlResource.hpp:35