#include <SFML/Config.h>
#include <SFML/Network/IPAddress.h>
#include <SFML/Network/Types.h>
Go to the source code of this file.
Enumerations | |
enum | sfFtpTransferMode { sfFtpBinary, sfFtpAscii, sfFtpEbcdic } |
Enumerate all the FTP file transfer modes. More... | |
enum | sfFtpStatus { sfFtpRestartMarkerReply = 110, sfFtpServiceReadySoon = 120, sfFtpDataConnectionAlreadyOpened = 125, sfFtpOpeningDataConnection = 150, sfFtpOk = 200, sfFtpPointlessCommand = 202, sfFtpSystemStatus = 211, sfFtpDirectoryStatus = 212, sfFtpFileStatus = 213, sfFtpHelpMessage = 214, sfFtpSystemType = 215, sfFtpServiceReady = 220, sfFtpClosingConnection = 221, sfFtpDataConnectionOpened = 225, sfFtpClosingDataConnection = 226, sfFtpEnteringPassiveMode = 227, sfFtpLoggedIn = 230, sfFtpFileActionOk = 250, sfFtpDirectoryOk = 257, sfFtpNeedPassword = 331, sfFtpNeedAccountToLogIn = 332, sfFtpNeedInformation = 350, sfFtpServiceUnavailable = 421, sfFtpDataConnectionUnavailable = 425, sfFtpTransferAborted = 426, sfFtpFileActionAborted = 450, sfFtpLocalError = 451, sfFtpInsufficientStorageSpace = 452, sfFtpCommandUnknown = 500, sfFtpParametersUnknown = 501, sfFtpCommandNotImplemented = 502, sfFtpBadCommandSequence = 503, sfFtpParameterNotImplemented = 504, sfFtpNotLoggedIn = 530, sfFtpNeedAccountToStore = 532, sfFtpFileUnavailable = 550, sfFtpPageTypeUnknown = 551, sfFtpNotEnoughMemory = 552, sfFtpFilenameNotAllowed = 553, sfFtpInvalidResponse = 1000, sfFtpConnectionFailed = 1001, sfFtpConnectionClosed = 1002, sfFtpInvalidFile = 1003 } |
Enumerate all the valid status codes returned in a FTP response. More... | |
Functions | |
CSFML_API void | sfFtpListingResponse_Destroy (sfFtpListingResponse *FtpListingResponse) |
Destroy an existing Ftp listing response. | |
CSFML_API sfBool | sfFtpListingResponse_IsOk (sfFtpListingResponse *FtpListingResponse) |
Convenience function to check if the response status code means a success. | |
CSFML_API sfFtpStatus | sfFtpListingResponse_GetStatus (sfFtpListingResponse *FtpListingResponse) |
Get the response status code. | |
CSFML_API const char * | sfFtpListingResponse_GetMessage (sfFtpListingResponse *FtpListingResponse) |
Get the full message contained in the response. | |
CSFML_API size_t | sfFtpListingResponse_GetCount (sfFtpListingResponse *FtpListingResponse) |
Get the number of filenames in the listing. | |
CSFML_API const char * | sfFtpListingResponse_GetFilename (sfFtpListingResponse *FtpListingResponse, size_t Index) |
Get the Index-th filename in the directory. | |
CSFML_API void | sfFtpDirectoryResponse_Destroy (sfFtpDirectoryResponse *FtpDirectoryResponse) |
Destroy an existing Ftp directory response. | |
CSFML_API sfBool | sfFtpDirectoryResponse_IsOk (sfFtpDirectoryResponse *FtpDirectoryResponse) |
Convenience function to check if the response status code means a success. | |
CSFML_API sfFtpStatus | sfFtpDirectoryResponse_GetStatus (sfFtpDirectoryResponse *FtpDirectoryResponse) |
Get the response status code. | |
CSFML_API const char * | sfFtpDirectoryResponse_GetMessage (sfFtpDirectoryResponse *FtpDirectoryResponse) |
Get the full message contained in the response. | |
CSFML_API const char * | sfFtpDirectoryResponse_GetDirectory (sfFtpDirectoryResponse *FtpDirectoryResponse) |
Get the directory returned in the response. | |
CSFML_API void | sfFtpResponse_Destroy (sfFtpResponse *FtpResponse) |
Destroy an existing Ftp response. | |
CSFML_API sfBool | sfFtpResponse_IsOk (sfFtpResponse *FtpResponse) |
Convenience function to check if the response status code means a success. | |
CSFML_API sfFtpStatus | sfFtpResponse_GetStatus (sfFtpResponse *FtpResponse) |
Get the response status code. | |
CSFML_API const char * | sfFtpResponse_GetMessage (sfFtpResponse *FtpResponse) |
Get the full message contained in the response. | |
CSFML_API sfFtp * | sfFtp_Create () |
Construct a new Ftp. | |
CSFML_API void | sfFtp_Destroy (sfFtp *Ftp) |
Destroy an existing Ftp. | |
CSFML_API sfFtpResponse * | sfFtp_Connect (sfFtp *Ftp, sfIPAddress Server, unsigned short Port, float Timeout) |
Connect to the specified FTP server. | |
CSFML_API sfFtpResponse * | sfFtp_LoginAnonymous (sfFtp *Ftp) |
Log in using anonymous account. | |
CSFML_API sfFtpResponse * | sfFtp_Login (sfFtp *Ftp, const char *UserName, const char *Password) |
Log in using a username and a password. | |
CSFML_API sfFtpResponse * | sfFtp_Disconnect (sfFtp *Ftp) |
Close the connection with FTP server. | |
CSFML_API sfFtpResponse * | sfFtp_KeepAlive (sfFtp *Ftp) |
Send a null command just to prevent from being disconnected. | |
CSFML_API sfFtpDirectoryResponse * | sfFtp_GetWorkingDirectory (sfFtp *Ftp) |
Get the current working directory. | |
CSFML_API sfFtpListingResponse * | sfFtp_GetDirectoryListing (sfFtp *Ftp, const char *Directory) |
Get the contents of the given directory (subdirectories and files). | |
CSFML_API sfFtpResponse * | sfFtp_ChangeDirectory (sfFtp *Ftp, const char *Directory) |
Change the current working directory. | |
CSFML_API sfFtpResponse * | sfFtp_ParentDirectory (sfFtp *Ftp) |
Go to the parent directory of the current one. | |
CSFML_API sfFtpResponse * | sfFtp_MakeDirectory (sfFtp *Ftp, const char *Name) |
Create a new directory. | |
CSFML_API sfFtpResponse * | sfFtp_DeleteDirectory (sfFtp *Ftp, const char *Name) |
Remove an existing directory. | |
CSFML_API sfFtpResponse * | sfFtp_RenameFile (sfFtp *Ftp, const char *File, const char *NewName) |
Rename a file. | |
CSFML_API sfFtpResponse * | sfFtp_DeleteFile (sfFtp *Ftp, const char *Name) |
Remove an existing file. | |
CSFML_API sfFtpResponse * | sfFtp_Download (sfFtp *Ftp, const char *DistantFile, const char *DestPath, sfFtpTransferMode Mode) |
Download a file from the server. | |
CSFML_API sfFtpResponse * | sfFtp_Upload (sfFtp *Ftp, const char *LocalFile, const char *DestPath, sfFtpTransferMode Mode) |
Upload a file to the server. |
enum sfFtpStatus |
Enumerate all the valid status codes returned in a FTP response.
enum sfFtpTransferMode |
CSFML_API sfFtpResponse* sfFtp_ChangeDirectory | ( | sfFtp * | Ftp, | |
const char * | Directory | |||
) |
Change the current working directory.
Ftp | : Ftp instance | |
Directory | : New directory, relative to the current one |
CSFML_API sfFtpResponse* sfFtp_Connect | ( | sfFtp * | Ftp, | |
sfIPAddress | Server, | |||
unsigned short | Port, | |||
float | Timeout | |||
) |
Connect to the specified FTP server.
Ftp | : Ftp instance | |
Server | : FTP server to connect to | |
Port | : Port used for connection (21 by default, standard FTP port) | |
Timeout | : Maximum time to wait (0 to use no timeout) |
CSFML_API sfFtp* sfFtp_Create | ( | ) |
Construct a new Ftp.
CSFML_API sfFtpResponse* sfFtp_DeleteDirectory | ( | sfFtp * | Ftp, | |
const char * | Name | |||
) |
Remove an existing directory.
Ftp | : Ftp instance | |
Name | : Name of the directory to remove |
CSFML_API sfFtpResponse* sfFtp_DeleteFile | ( | sfFtp * | Ftp, | |
const char * | Name | |||
) |
Remove an existing file.
Ftp | : Ftp instance | |
Name | : File to remove |
CSFML_API void sfFtp_Destroy | ( | sfFtp * | Ftp | ) |
Destroy an existing Ftp.
Ftp | : Ftp to destroy |
CSFML_API sfFtpResponse* sfFtp_Disconnect | ( | sfFtp * | Ftp | ) |
Close the connection with FTP server.
Ftp | : Ftp instance |
CSFML_API sfFtpResponse* sfFtp_Download | ( | sfFtp * | Ftp, | |
const char * | DistantFile, | |||
const char * | DestPath, | |||
sfFtpTransferMode | Mode | |||
) |
Download a file from the server.
Ftp | : Ftp instance | |
DistantFile | : Path of the distant file to download | |
DestPath | : Where to put to file on the local computer | |
Mode | : Transfer mode (binary by default) |
CSFML_API sfFtpListingResponse* sfFtp_GetDirectoryListing | ( | sfFtp * | Ftp, | |
const char * | Directory | |||
) |
Get the contents of the given directory (subdirectories and files).
Ftp | : Ftp instance | |
Directory | : Directory to list ("" by default, the current one) |
CSFML_API sfFtpDirectoryResponse* sfFtp_GetWorkingDirectory | ( | sfFtp * | Ftp | ) |
Get the current working directory.
Ftp | : Ftp instance |
CSFML_API sfFtpResponse* sfFtp_KeepAlive | ( | sfFtp * | Ftp | ) |
Send a null command just to prevent from being disconnected.
Ftp | : Ftp instance |
CSFML_API sfFtpResponse* sfFtp_Login | ( | sfFtp * | Ftp, | |
const char * | UserName, | |||
const char * | Password | |||
) |
Log in using a username and a password.
Ftp | : Ftp instance | |
UserName | : User name | |
Password | : Password |
CSFML_API sfFtpResponse* sfFtp_LoginAnonymous | ( | sfFtp * | Ftp | ) |
Log in using anonymous account.
Ftp | : Ftp instance |
CSFML_API sfFtpResponse* sfFtp_MakeDirectory | ( | sfFtp * | Ftp, | |
const char * | Name | |||
) |
Create a new directory.
Ftp | : Ftp instance | |
Name | : Name of the directory to create |
CSFML_API sfFtpResponse* sfFtp_ParentDirectory | ( | sfFtp * | Ftp | ) |
Go to the parent directory of the current one.
Ftp | : Ftp instance |
CSFML_API sfFtpResponse* sfFtp_RenameFile | ( | sfFtp * | Ftp, | |
const char * | File, | |||
const char * | NewName | |||
) |
Rename a file.
Ftp | : Ftp instance | |
File | : File to rename | |
NewName | : New name |
CSFML_API sfFtpResponse* sfFtp_Upload | ( | sfFtp * | Ftp, | |
const char * | LocalFile, | |||
const char * | DestPath, | |||
sfFtpTransferMode | Mode | |||
) |
Upload a file to the server.
Ftp | : Ftp instance | |
LocalFile | : Path of the local file to upload | |
DestPath | : Where to put to file on the server | |
Mode | : Transfer mode (binary by default) |
CSFML_API void sfFtpDirectoryResponse_Destroy | ( | sfFtpDirectoryResponse * | FtpDirectoryResponse | ) |
Destroy an existing Ftp directory response.
FtpDirectoryResponse | : Ftp directory response to destroy |
CSFML_API const char* sfFtpDirectoryResponse_GetDirectory | ( | sfFtpDirectoryResponse * | FtpDirectoryResponse | ) |
Get the directory returned in the response.
FtpDirectoryResponse | : Ftp directory response |
CSFML_API const char* sfFtpDirectoryResponse_GetMessage | ( | sfFtpDirectoryResponse * | FtpDirectoryResponse | ) |
Get the full message contained in the response.
FtpDirectoryResponse | : Ftp directory response |
CSFML_API sfFtpStatus sfFtpDirectoryResponse_GetStatus | ( | sfFtpDirectoryResponse * | FtpDirectoryResponse | ) |
Get the response status code.
FtpDirectoryResponse | : Ftp directory response |
CSFML_API sfBool sfFtpDirectoryResponse_IsOk | ( | sfFtpDirectoryResponse * | FtpDirectoryResponse | ) |
Convenience function to check if the response status code means a success.
FtpDirectoryResponse | : Ftp directory response |
CSFML_API void sfFtpListingResponse_Destroy | ( | sfFtpListingResponse * | FtpListingResponse | ) |
Destroy an existing Ftp listing response.
FtpResponse | : Ftp listing response to destroy |
CSFML_API size_t sfFtpListingResponse_GetCount | ( | sfFtpListingResponse * | FtpListingResponse | ) |
Get the number of filenames in the listing.
FtpListingResponse | : Ftp listing response |
CSFML_API const char* sfFtpListingResponse_GetFilename | ( | sfFtpListingResponse * | FtpListingResponse, | |
size_t | Index | |||
) |
Get the Index-th filename in the directory.
FtpListingResponse | : Ftp listing response | |
Index | : Index of the filename to get |
CSFML_API const char* sfFtpListingResponse_GetMessage | ( | sfFtpListingResponse * | FtpListingResponse | ) |
Get the full message contained in the response.
FtpListingResponse | : Ftp listing response |
CSFML_API sfFtpStatus sfFtpListingResponse_GetStatus | ( | sfFtpListingResponse * | FtpListingResponse | ) |
Get the response status code.
FtpListingResponse | : Ftp listing response |
CSFML_API sfBool sfFtpListingResponse_IsOk | ( | sfFtpListingResponse * | FtpListingResponse | ) |
Convenience function to check if the response status code means a success.
FtpListingResponse | : Ftp listing response |
CSFML_API void sfFtpResponse_Destroy | ( | sfFtpResponse * | FtpResponse | ) |
Destroy an existing Ftp response.
FtpResponse | : Ftp response to destroy |
CSFML_API const char* sfFtpResponse_GetMessage | ( | sfFtpResponse * | FtpResponse | ) |
Get the full message contained in the response.
FtpResponse | : Ftp response |
CSFML_API sfFtpStatus sfFtpResponse_GetStatus | ( | sfFtpResponse * | FtpResponse | ) |
Get the response status code.
FtpResponse | : Ftp response |
CSFML_API sfBool sfFtpResponse_IsOk | ( | sfFtpResponse * | FtpResponse | ) |
Convenience function to check if the response status code means a success.
FtpResponse | : Ftp response |