[ROOT] --> C++Client

class PCREFileServer
    inherited from public PCREService

The PCREFileServer class provides FTP manangement for the C++ client.

Author:
Copyright (c) 2000 Dynalivery Corp., All Rights Reserved.

Version:
2.4.0

Source:
MobileApps\PCRE\CppClient\Include\PCREFileServer.h

Friends:
 friend class PCREClient ;
 friend class PCREAppClient ;

Constructors Index

PCREFileServer
Request a PCREFileServer with the given host and server name.
PCREFileServer
Request a PCREFileServer with the given host.
PCREFileServer
Request a PCREFileServer.

Methods Index

CloseFTP
Close the connection to the FTP Server.
Connect
CreateDirectory
Create a remote directory.
DeleteFile
Delete a remote file.
DeleteLocalFile
Delete a LOCAL file.
Disconnect
Terminate the connection to this server.
GetCurrentDir
Get the current directory.
GetFile
Retrieve a file from the remote server, give it the same name locally.
GetFile
Retrieve a file from the remote server, give it the different name locally.
GetFiles
Retrieve multiple files from the remote server.
GetFiles
Retrieve multiple files from the remote server, storing them in a named local directory.
getFTPPassword
Retrieve the FTP Server's password.
getFTPPortNumber
Retrieve the FTP Server's port-number.
getFTPRootDir
Retrieve FTP Server's root directory.
getFTPUsername
Retrieve the FTP Server's user-name
getService
Retrieve the name of this service.
IsFTPConnected
Query the connection state of the FTP server.
OpenFTP
Open a connection to the FTP Server using the supplied username and password.
PurgeDirectory
Delete all files in the current directory. This will NOT include any subdirectorys.
PutFile
Store a file on the remote server, give it the same name as it has locally.
PutFile
Store a file on the remote server.
PutFiles
Store multiple files on the remote server.
RemoveDirectory
Remove a remote directory [MUST by empty]
RenameFile
Rename a remote file.
SetCurrentDir
Change directory on the remote server.
useAnonymousFTP
Retrieve the anonymous login permission.
Validate
Validate the file-transfer service provided by the report-server.


Constructors

PCREFileServer

 PCREFileServer ( const char* host , const char* name ) ;

Request a PCREFileServer with the given host and server name.

Parameters:
host The host machine.
name The server name.

PCREFileServer

 PCREFileServer ( const char * host ) ;

Request a PCREFileServer with the given host.

Parameters:
host The host machine.

PCREFileServer

 PCREFileServer ( ) ;

Request a PCREFileServer.


Methods

getService

 const char * getService ( ) ;

Retrieve the name of this service.

Return:
The name of this service.

Validate

 BOOL Validate ( ) ;

Validate the file-transfer service provided by the report-server.

Return:
TRUE if the report server is configured with a valid service.

Connect

 void Connect ( ) ;

Connect client to file server.

Disconnect

 void Disconnect ( ) ;

Terminate the connection to this server.

getFTPRootDir

 char * getFTPRootDir ( ) ;

Retrieve FTP Server's root directory.

Return:
The full path-name of the FTP Server root directory.

useAnonymousFTP

 BOOL useAnonymousFTP ( ) ;

Retrieve the anonymous login permission.

Return:
Returns TRUE if the FTP server supports anonymous logins.

getFTPPortNumber

 int getFTPPortNumber ( ) ;

Retrieve the FTP Server's port-number.

Return:
The FTP Server port-number.

getFTPUsername

 char * getFTPUsername ( ) ;

Retrieve the FTP Server's user-name

Return:
The FTP Server user-name.

getFTPPassword

 char * getFTPPassword ( ) ;

Retrieve the FTP Server's password.

Return:
The FTP Server password.

OpenFTP

 void OpenFTP ( char * username ,
                      char * password ,
                      int port = 21) ) ;

Open a connection to the FTP Server using the supplied username and password.

Parameters:
username The username to use when loggin onto the server.
password The password associated with the supplied username.

IsFTPConnected

 BOOL IsFTPConnected ( ) ;

Query the connection state of the FTP server.

Return:
TRUE if the service is connected to an FTP server

CloseFTP

 void CloseFTP ( ) ;

Close the connection to the FTP Server.

GetFile

 void GetFile ( char * remoteFile ) ;

Retrieve a file from the remote server, give it the same name locally.

Parameters:
remoteFile The name of the remote file to retrieve.

GetFile

 void GetFile ( char * remoteFile ,
                      char * localFile ) ;

Retrieve a file from the remote server, give it the different name locally.

Parameters:
remoteFile The name of the remote file to retrieve.
localFile The place to save the retrieved file locally.

GetFiles

 void GetFiles ( char * remoteFileRegexp ,
                       BOOL del = FALSE ) ;

Retrieve multiple files from the remote server.

Parameters:
remoteFileRegexp The pattern for files to be retrieving. This is a regular expression.
del If this is TRUE, delete the files after retrieving them.

GetFiles

 void GetFiles ( char * localDirectory ,
                       char * remoteFileRegexp ,
                       BOOL del = FALSE ) ;

Retrieve multiple files from the remote server, storing them in a named local directory.

Parameters:
localDirectory The directory to store the files into locally.
remoteFileRegexp The pattern for files to be retrieving. This is a regular expression.
del If this is TRUE, delete the files after retrieving them.

PutFile

 void PutFile ( char * localFile ) ;

Store a file on the remote server, give it the same name as it has locally.

Parameters:
localFile The name of the local file to store.

PutFile

 void PutFile ( char * localFile ,
                      char * remoteFile ) ;

Store a file on the remote server.

Parameters:
localFile The name of the local file to store.
remoteFile The name to give the file remotely.

PutFiles

 void PutFiles ( char * localFileRegexp ,
                       BOOL del = FALSE ) ;

Store multiple files on the remote server.

Parameters:
localFileRegexp The pattern for files to be stored. This is a wildcard pattern.

GetCurrentDir

 char * GetCurrentDir ( ) ;

Get the current directory.

Return:
The current directory.

SetCurrentDir

 void SetCurrentDir ( char * dirName ) ;

Change directory on the remote server.

Parameters:
dirName The name of the directory to change to.

DeleteFile

 void DeleteFile ( char * fileName ) ;

Delete a remote file.

Parameters:
fileName The name of the file to delete.

DeleteLocalFile

 void DeleteLocalFile ( char * fileName ) ;

Delete a LOCAL file.

Parameters:
fileName The name of the local file to delete.

RenameFile

 void RenameFile ( char * oldName ,
                         char * newName ) ;

Rename a remote file.

Parameters:
oldName The name of the file to rename.
newName The new name to call this file.

RemoveDirectory

 void RemoveDirectory ( char * dirName ) ;

Remove a remote directory [MUST by empty]

Parameters:
dirName The name of the remote directory to delete.

CreateDirectory

 void CreateDirectory ( char * dirName ) ;

Create a remote directory.

Parameters:
dirName The name of the remote directory to create.

PurgeDirectory

 void PurgeDirectory ( ) ;

Delete all files in the current directory. This does NOT include any subdirectories.


Copyright (c) 2000 Dynalivery Corp.