Loading...
Searching...
No Matches
Ftp.h
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.
135CSFML_NETWORK_API sfBool sfFtpListingResponse_isOk(const sfFtpListingResponse* ftpListingResponse);
145CSFML_NETWORK_API sfFtpStatus sfFtpListingResponse_getStatus(const sfFtpListingResponse* ftpListingResponse);
155CSFML_NETWORK_API const char* sfFtpListingResponse_getMessage(const sfFtpListingResponse* ftpListingResponse);
165CSFML_NETWORK_API size_t sfFtpListingResponse_getCount(const sfFtpListingResponse* ftpListingResponse);
176CSFML_NETWORK_API const char* sfFtpListingResponse_getName(const sfFtpListingResponse* ftpListingResponse, size_t index);
184CSFML_NETWORK_API void sfFtpDirectoryResponse_destroy(sfFtpDirectoryResponse* ftpDirectoryResponse);
197CSFML_NETWORK_API sfBool sfFtpDirectoryResponse_isOk(const sfFtpDirectoryResponse* ftpDirectoryResponse);
207CSFML_NETWORK_API sfFtpStatus sfFtpDirectoryResponse_getStatus(const sfFtpDirectoryResponse* ftpDirectoryResponse);
217CSFML_NETWORK_API const char* sfFtpDirectoryResponse_getMessage(const sfFtpDirectoryResponse* ftpDirectoryResponse);
227CSFML_NETWORK_API const char* sfFtpDirectoryResponse_getDirectory(const sfFtpDirectoryResponse* ftpDirectoryResponse);
307CSFML_NETWORK_API sfFtpResponse* sfFtp_connect(sfFtp* ftp, sfIpAddress server, unsigned short port, sfTime timeout);
335CSFML_NETWORK_API sfFtpResponse* sfFtp_login(sfFtp* ftp, const char* name, const char* password);
387CSFML_NETWORK_API sfFtpListingResponse* sfFtp_getDirectoryListing(sfFtp* ftp, const char* directory);
455CSFML_NETWORK_API sfFtpResponse* sfFtp_renameFile(sfFtp* ftp, const char* file, const char* newName);
489CSFML_NETWORK_API sfFtpResponse* sfFtp_download(sfFtp* ftp, const char* remoteFile, const char* localPath, sfFtpTransferMode mode);
508CSFML_NETWORK_API sfFtpResponse* sfFtp_upload(sfFtp* ftp, const char* localFile, const char* remotePath, sfFtpTransferMode mode, sfBool append);
528CSFML_NETWORK_API sfFtpResponse* sfFtp_sendCommand(sfFtp* ftp, const char* command, const char* parameter);
sfFtpResponse * sfFtp_deleteFile(sfFtp *ftp, const char *name)
Remove an existing file.
void sfFtpDirectoryResponse_destroy(sfFtpDirectoryResponse *ftpDirectoryResponse)
Destroy a FTP directory response.
const char * sfFtpDirectoryResponse_getMessage(const sfFtpDirectoryResponse *ftpDirectoryResponse)
Get the full message contained in a FTP directory response.
sfFtpResponse * sfFtp_deleteDirectory(sfFtp *ftp, const char *name)
Remove an existing directory.
sfFtpResponse * sfFtp_upload(sfFtp *ftp, const char *localFile, const char *remotePath, sfFtpTransferMode mode, sfBool append)
Upload a file to a FTP server.
sfBool sfFtpDirectoryResponse_isOk(const sfFtpDirectoryResponse *ftpDirectoryResponse)
Check if a FTP directory response status code means a success.
const char * sfFtpListingResponse_getMessage(const sfFtpListingResponse *ftpListingResponse)
Get the full message contained in a FTP listing response.
sfFtpResponse * sfFtp_loginAnonymous(sfFtp *ftp)
Log in using an anonymous account.
sfBool sfFtpResponse_isOk(const sfFtpResponse *ftpResponse)
Check if a FTP response status code means a success.
sfFtpResponse * sfFtp_renameFile(sfFtp *ftp, const char *file, const char *newName)
Rename an existing file.
const char * sfFtpListingResponse_getName(const sfFtpListingResponse *ftpListingResponse, size_t index)
Return a directory/file name contained in a FTP listing response.
size_t sfFtpListingResponse_getCount(const sfFtpListingResponse *ftpListingResponse)
Return the number of directory/file names contained in a FTP listing response.
sfFtpResponse * sfFtp_createDirectory(sfFtp *ftp, const char *name)
Create a new directory.
sfFtpResponse * sfFtp_sendCommand(sfFtp *ftp, const char *command, const char *parameter)
Send a command to the FTP server.
sfFtpResponse * sfFtp_connect(sfFtp *ftp, sfIpAddress server, unsigned short port, sfTime timeout)
Connect to the specified FTP server.
sfFtpStatus sfFtpListingResponse_getStatus(const sfFtpListingResponse *ftpListingResponse)
Get the status code of a FTP listing response.
sfFtpResponse * sfFtp_changeDirectory(sfFtp *ftp, const char *directory)
Change the current working directory.
sfBool sfFtpListingResponse_isOk(const sfFtpListingResponse *ftpListingResponse)
Check if a FTP listing response status code means a success.
sfFtpResponse * sfFtp_keepAlive(sfFtp *ftp)
Send a null command to keep the connection alive.
sfFtpStatus sfFtpResponse_getStatus(const sfFtpResponse *ftpResponse)
Get the status code of a FTP response.
const char * sfFtpResponse_getMessage(const sfFtpResponse *ftpResponse)
Get the full message contained in a FTP response.
void sfFtpListingResponse_destroy(sfFtpListingResponse *ftpListingResponse)
Destroy a FTP listing response.
sfFtpStatus sfFtpDirectoryResponse_getStatus(const sfFtpDirectoryResponse *ftpDirectoryResponse)
Get the status code of a FTP directory response.
sfFtpDirectoryResponse * sfFtp_getWorkingDirectory(sfFtp *ftp)
Get the current working directory.
sfFtpResponse * sfFtp_login(sfFtp *ftp, const char *name, const char *password)
Log in using a username and a password.
sfFtpResponse * sfFtp_download(sfFtp *ftp, const char *remoteFile, const char *localPath, sfFtpTransferMode mode)
Download a file from a FTP server.
@ sfFtpClosingDataConnection
Closing data connection, requested file action successful.
Definition Ftp.h:73
@ sfFtpInsufficientStorageSpace
Requested action not taken; insufficient storage space in system, file unavailable.
Definition Ftp.h:92
@ sfFtpNotEnoughMemory
Requested file action aborted, exceeded storage allocation.
Definition Ftp.h:105
@ sfFtpSystemType
NAME system type, where NAME is an official system name from the list in the Assigned Numbers documen...
Definition Ftp.h:69
@ sfFtpDataConnectionAlreadyOpened
Data connection already opened, transfer starting.
Definition Ftp.h:59
sfFtpResponse * sfFtp_parentDirectory(sfFtp *ftp)
Go to the parent directory of the current one.
const char * sfFtpDirectoryResponse_getDirectory(const sfFtpDirectoryResponse *ftpDirectoryResponse)
Get the directory returned in a FTP directory response.
sfFtpListingResponse * sfFtp_getDirectoryListing(sfFtp *ftp, const char *directory)
Get the contents of the given directory.
struct sfFtpDirectoryResponse sfFtpDirectoryResponse
Definition Network/Types.h:29