PFTPClient Class Reference
#include <ftp.h>
List of all members.
Detailed Description
File Transfer Protocol client channel class.
Constructor & Destructor Documentation
PFTPClient::PFTPClient |
( |
|
) |
|
Declare an FTP client socket.
PFTPClient::~PFTPClient |
( |
|
) |
|
Delete and close the socket.
Member Function Documentation
Change the current directory on the remote FTP host.
- Returns:
- PTrue if the log in was successfull.
- Parameters:
-
virtual PBoolean PFTPClient::Close |
( |
|
) |
[virtual] |
Close the socket, and if connected as a client, QUITs from server.
- Returns:
- PTrue if the channel was closed and the QUIT accepted by the server.
Reimplemented from PIndirectChannel.
Create a directory on the remote FTP host.
- Returns:
- PTrue if the directory was created successfully.
- Parameters:
-
| path | Name of the directory to create. |
PString PFTPClient::GetCurrentDirectory |
( |
|
) |
|
Get the current working directory on the remote FTP host.
- Returns:
- String for the directory path, or empty string if an error occurred.
Get a list of files from the current working directory on the remote FTP host.
- Returns:
- String array for the files in the directory.
- Parameters:
-
| path | Name to get details for. |
| type | Detail level on a directory entry. |
| channel | Data channel type. |
Get a list of files from the current working directory on the remote FTP host.
- Returns:
- String array for the files in the directory.
- Parameters:
-
| type | Detail level on a directory entry. |
| channel | Data channel type. |
Begin retreiving a file from the remote FTP server. The second parameter indicates that the transfer is on a normal or passive data channel. In short, a normal transfer the server connects to the client and in passive mode the client connects to the server.
- Returns:
- Socket to read data from, or NULL if an error occurred.
- Parameters:
-
| filename | Name of file to get |
| channel | Data channel type. |
Get status information for the file path specified.
- Returns:
- String giving file status.
- Parameters:
-
| path | Path to get status for. |
| channel | Data channel type. |
PString PFTPClient::GetSystemType |
( |
|
) |
|
Get the type of the remote FTP server system, eg Unix, WindowsNT etc.
- Returns:
- String for the type of system.
Log in to the remote host for FTP.
- Returns:
- PTrue if the log in was successfull.
- Parameters:
-
| username | User name for FTP log in. |
| password | Password for the specified user name. |
virtual PBoolean PFTPClient::OnOpen |
( |
|
) |
[protected, virtual] |
Begin storing a file to the remote FTP server. The second parameter indicates that the transfer is on a normal or passive data channel. In short, a normal transfer the server connects to the client and in passive mode the client connects to the server.
- Returns:
- Socket to write data to, or NULL if an error occurred.
- Parameters:
-
| filename | Name of file to get |
| channel | Data channel type. |
Set the transfer type.
- Returns:
- PTrue if transfer type set.
- Parameters:
-
| type | RepresentationTypeof file to transfer |
Member Data Documentation
Port number on remote system.
The documentation for this class was generated from the following file: