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.
293 [[nodiscard]] Response connect(IpAddress server, unsigned short port = 21, Time timeout = Time::Zero);
441 [[nodiscard]] Response renameFile(const std::filesystem::path& file, const std::filesystem::path& newName);
526 [[nodiscard]] Response sendCommand(const std::string& command, const std::string& parameter = "");
Specialization of FTP response returning a directory.
Definition Ftp.hpp:188
DirectoryResponse(const Response &response)
Default constructor.
const std::filesystem::path & getDirectory() const
Get the directory returned in the response.
Specialization of FTP response returning a file name listing.
Definition Ftp.hpp:219
const std::vector< std::string > & getListing() const
Return the array of directory/file names.
ListingResponse(const Response &response, const std::string &data)
Default constructor.
Response(Status code=Status::InvalidResponse, std::string message="")
Default constructor.
const std::string & getMessage() const
Get the full message contained in the response.
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.
Response connect(IpAddress server, unsigned short port=21, Time timeout=Time::Zero)
Connect to the specified 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 download(const std::filesystem::path &remoteFile, const std::filesystem::path &localPath, TransferMode mode=TransferMode::Binary)
Download a file from the server.
Response renameFile(const std::filesystem::path &file, const std::filesystem::path &newName)
Rename an existing file.
Response login(const std::string &name, const std::string &password)
Log in using a username and a password.
Response upload(const std::filesystem::path &localFile, const std::filesystem::path &remotePath, TransferMode mode=TransferMode::Binary, bool append=false)
Upload a file to the server.
Definition AudioResource.hpp:36