![]() |
Qorus Integration Engine® Enterprise Edition 7.0.1_prod
|
this class is used to customize and control the behavior of Qorus FTP servers attached to services More...
Public Member Methods | |
constructor (*string root, bool bin=False, HttpServer::AbstractAuthenticator auth=new DefaultQorusRBACAuthenticator()) | |
creates the object with the given arguments | |
addListener (int port) | |
adds a listener from a port number; listener will start up on all interfaces on the given port | |
addListener (string bind) | |
adds a listener from a bind string in the format: "address:port" (ex: "192.168.20.1:8011" ) | |
addListeners (list< auto > l) | |
adds a list of listeners from a list of bind addresses | |
string | authReceiveFile (string cwd, string orig, string path) |
this method is run when the server receives a "STOR" command from the client but before the server opens the data channel to receive the file | |
*string | authReceiveFile (string cwd, string orig, reference< string > path) |
this method is run when the server receives a "STOR" command from the client but before the server opens the data channel to receive the file; return no value if the server should accept the file, otherwise return a string that will be passed back to the client with a 500 error code rejecting the "STOR" request | |
fileDataReceived (string path, data data) | |
this method is called when the server has received a file and no root directory is set | |
fileReceived (string path) | |
this method is called when the server has received a file | |
string | authSendFile (string cwd, string orig, string path) |
this method is run when the server receives a "RETR" command from the client but before the server opens the data channel to send the file | |
*string | authSendFile (string cwd, string orig, reference< string > path) |
this method is run when the server receives a "RETR" command from the client but before the server opens the data channel to receive the file; return no value if the server should accept the file, otherwise return a string that will be passed back to the client with a 500 error code rejecting the request | |
data | sendFile (string path) |
this method is called when the server should send a file | |
int | size (string cwd, string orig, string path) |
this method is called when the "SIZE" command is received | |
*string | size (string cwd, string orig, string path, reference< int > size) |
this method is called when the "SIZE" command is received | |
date | modifiedTime (string cwd, string orig, string path) |
this method is called when the "MDTM" command is received | |
*string | modifiedTime (string cwd, string orig, string path, reference< date > mdate) |
this method is called when the "MDTM" command is received | |
fileSent (string path) | |
this method is called when the server has sent a file | |
string | authChangeDir (string cwd, string orig, string path) |
this method is run when the server receives a "CWD" command from the client but before the server updates the current working directory | |
*string | authChangeDir (string cwd, string orig, reference< string > path) |
this method is run when the server receives a "CWD" command from the client but before the server updates the current working directory; return no value if the server should accept the change directory request, otherwise return a string that will be passed back to the client with a 550 error code rejecting the "CWD" request | |
string | authRename (string cwd, string orig, string path) |
this method is run when the server receives a "RNFR" command from the client | |
*string | authRename (string cwd, string orig, reference< string > path) |
this method is run when the server receives a "RNFR" command from the client; return no value if the server should accept the request, otherwise return a string that will be passed back to the client with a 550 error code rejecting the "RNFR" request | |
*string | rename (string cwd, string orig_to, string from, string to) |
this method is run when the server receives a "RNTO" command from the client; return no value if the server should accept the request (and thie method has already effected the rename of the file), otherwise return a string that will be passed back to the client with a 550 error code rejecting the request | |
string | list (string cwd, *string path) |
this method is run when the server receives a "LIST" command from the client | |
*string | list (string cwd, *string path, reference< string > output) |
this method is run when the server receives a "LIST" command from the client; return no value and set the output reference if the server should accept the request, otherwise return a string that will be passed back to the client with a 550 error code rejecting the request | |
string | nlst (string cwd, *string path) |
this method is run when the server receives a "NLST" command from the client; return no value and set the output reference if the server should accept the request, otherwise return a string that will be passed back to the client with a 550 error code rejecting the request | |
*string | nlst (string cwd, *string path, reference< string > output) |
this method is run when the server receives a "NLST" command from the client; return no value and set the output reference if the server should accept the request, otherwise return a string that will be passed back to the client with a 550 error code rejecting the request | |
string | machineListFile (string cwd, *string orig, string path) |
this method is run when the server receives a "MLST" command from the client | |
*string | machineListFile (string cwd, *string orig, string path, reference< string > output) |
this method is run when the server receives a "MLST" command from the client; return no value and set the output reference if the server should accept the request, otherwise return a string that will be passed back to the client with a 550 error code rejecting the request | |
string | machineListDir (string cwd, *string orig, string path) |
this method is run when the server receives a "MLSD" command from the client | |
*string | machineListDir (string cwd, *string orig, string path, *reference< string > output, *reference< bool > isdir) |
this method is run when the server receives a "MLSD" command from the client; return no value and set the output reference if the server should accept the request, otherwise return a string that will be passed back to the client with a 550 error code rejecting the request | |
string | getTargetPath (string path) |
returns the real path on the filesystem for the given virtual path | |
*string | makeDir (string cwd, string orig, string path) |
this method is run when the server receives a "MKD" command from the client; return no value if the server should accept the request, otherwise return a string that will be passed back to the client with a 550 error code rejecting the request | |
*string | removeDir (string cwd, string orig, string path) |
this method is run when the server receives a "RMD" command from the client; return no value if the server should accept the request, otherwise return a string that will be passed back to the client with a 550 error code rejecting the request | |
*string | deleteFile (string cwd, string orig, string path) |
this method is run when the server receives a "DELE" command from the client; return no value if the server should accept the request, otherwise return a string that will be passed back to the client with a 550 error code rejecting the request | |
logFatal (softstring msg) | |
writes the message to the service log file if the log level is equal or lower | |
logError (softstring msg) | |
writes the message to the service log file if the log level is equal or lower | |
logWarn (softstring msg) | |
writes the message to the service log file if the log level is equal or lower | |
logInfo (softstring msg) | |
writes the message to the service log file if the log level is equal or lower | |
logDebug (softstring msg) | |
writes the message to the service log file if the log level is equal or lower | |
logTrace (softstring msg) | |
writes the message to the service log file if the log level is equal or lower | |
Public Attributes | |
*string | root |
the root directory for file-based FTP servers | |
bool | bin |
if False (the default), then files are received as strings, if True, then as binary objects | |
list< auto > | listeners = () |
list of listener info | |
HttpServer::AbstractAuthenticator | auth |
authentication object | |
Private Member Methods | |
int | sizeImpl (string cwd, string orig, string path) |
this method is called when the "SIZE" command is received | |
date | modifiedTimeImpl (string cwd, string orig, string path) |
this method is called when the "MDTM" command is received | |
string | authChangeDirImpl (string cwd, string orig, string path) |
this method is run when the server receives a "CWD" command from the client but before the server updates the current working directory | |
string | authRenameImpl (string cwd, string orig, string path) |
this method is run when the server receives a "RNFR" command from the client | |
renameImpl (string cwd, string orig_to, string from, string to) | |
this method is run when the server receives a "RNTO" command from the client; return no value if the server should accept the request (and thie method has already effected the rename of the file), otherwise return a string that will be passed back to the client with a 550 error code rejecting the request | |
string | listImpl (string cwd, *string path) |
this method is run when the server receives a "LIST" command from the client | |
string | nlstImpl (string cwd, *string path) |
this method is run when the server receives a "NLST" command from the client; return no value and set the output reference if the server should accept the request, otherwise return a string that will be passed back to the client with a 550 error code rejecting the request | |
string | machineListFileImpl (string cwd, *string orig, string path) |
this method is run when the server receives a "MLST" command from the client | |
string | machineListDirImpl (string cwd, *string orig, string path) |
this method is run when the server receives a "MLSD" command from the client | |
makeDirImpl (string cwd, string orig, string path) | |
this method is run when the server receives a "MKD" command from the client; return no value if the server should accept the request, otherwise return a string that will be passed back to the client with a 550 error code rejecting the request | |
removeDirImpl (string cwd, string orig, string path) | |
this method is run when the server receives a "RMD" command from the client; return no value if the server should accept the request, otherwise return a string that will be passed back to the client with a 550 error code rejecting the request | |
deleteFileImpl (string cwd, string orig, string path) | |
this method is run when the server receives a "DELE" command from the client | |
Static Private Member Methods | |
static | checkCompatErrorResponse (*string errstr) |
Checks for an error response and throws an FTP-RESPONSE-ERROR exception if found. | |
this class is used to customize and control the behavior of Qorus FTP servers attached to services
OMQ::AbstractFtpHandler::addListener | ( | int | port | ) |
adds a listener from a port number; listener will start up on all interfaces on the given port
port | the port number to listen on; the listener will start up on all interfaces on the given port |
OMQ::AbstractFtpHandler::addListener | ( | string | bind | ) |
adds a listener from a bind string in the format: "address:port"
(ex: "192.168.20.1:8011"
)
bind | the address:port string to bind the listener to |
OMQ::AbstractFtpHandler::addListeners | ( | list< auto > | l | ) |
adds a list of listeners from a list of bind addresses
l | list of listeners; each element should be either a bind string in the format: "address:port" (ex: "192.168.20.1:8011" ) or an integer port, meaning to bind on all interfaces on that port |
*string OMQ::AbstractFtpHandler::authChangeDir | ( | string | cwd, |
string | orig, | ||
reference< string > | path | ||
) |
this method is run when the server receives a "CWD"
command from the client but before the server updates the current working directory; return no value if the server should accept the change directory request, otherwise return a string that will be passed back to the client with a 550 error code rejecting the "CWD"
request
cwd | the current working directory |
orig | the original literal argument passed by the client |
path | a reference to a string giving the normalized version of the directory name sent by the client (normalized means that it is a complete path from "/" without any references to ".." or "."); the actual directory name can be changed by this method by modifying the value of the reference (and returning NOTHING to authorize the change directory command) |
FTP-RESPONSE-ERROR | thrown if the argument has a value; set the exception arg value to an integer error code to override the default (500 ) |
string OMQ::AbstractFtpHandler::authChangeDir | ( | string | cwd, |
string | orig, | ||
string | path | ||
) |
this method is run when the server receives a "CWD"
command from the client but before the server updates the current working directory
cwd | the current working directory |
orig | the original literal argument passed by the client |
path | the normalized version of the directory name sent by the client (normalized means that it is a complete path from "/" without any references to ".." or ".") |
FTP-RESPONSE-ERROR | thrown if the argument has a value; set the exception arg value to an integer error code to override the default (550 ) |
|
private |
this method is run when the server receives a "CWD"
command from the client but before the server updates the current working directory
cwd | the current working directory |
orig | the original literal argument passed by the client |
path | the normalized version of the directory name sent by the client (normalized means that it is a complete path from "/" without any references to ".." or ".") |
FTP-RESPONSE-ERROR | thrown if the argument has a value; set the exception arg value to an integer error code to override the default (550 ) |
*string OMQ::AbstractFtpHandler::authReceiveFile | ( | string | cwd, |
string | orig, | ||
reference< string > | path | ||
) |
this method is run when the server receives a "STOR"
command from the client but before the server opens the data channel to receive the file; return no value if the server should accept the file, otherwise return a string that will be passed back to the client with a 500 error code rejecting the "STOR"
request
cwd | the current working directory |
orig | the original literal argument passed by the client |
path | a reference to a string giving the normalized path for the file that the client would like to send to the server; the actual file name can be changed by this method by modifying the value of the reference (and returning NOTHING to authorize the receipt of the file) |
"STOR"
request; note that the default is to return no value and therefore accept the file from the clientstring OMQ::AbstractFtpHandler::authReceiveFile | ( | string | cwd, |
string | orig, | ||
string | path | ||
) |
this method is run when the server receives a "STOR"
command from the client but before the server opens the data channel to receive the file
cwd | the current working directory |
orig | the original literal argument passed by the client |
path | the normalized path for the file that the client would like to send to the server; the actual file name can be changed by this method by returning a path key in the response value |
FTP-RESPONSE-ERROR | thrown if the argument has a value |
arg
value to an integer error code to override the default (500
)*string OMQ::AbstractFtpHandler::authRename | ( | string | cwd, |
string | orig, | ||
reference< string > | path | ||
) |
this method is run when the server receives a "RNFR"
command from the client; return no value if the server should accept the request, otherwise return a string that will be passed back to the client with a 550 error code rejecting the "RNFR"
request
cwd | the current working directory |
orig | the original literal argument passed by the client |
path | a reference to a string giving the normalized version of the path (normalized means that it is a complete path from "/" without any references to ".." or "."); the actual path can be changed by this method by modifying the value of the reference (and returning NOTHING to authorize the command) |
FTP-RESPONSE-ERROR | thrown if the argument has a value; set the exception arg value to an integer error code to override the default (550 ) |
string OMQ::AbstractFtpHandler::authRename | ( | string | cwd, |
string | orig, | ||
string | path | ||
) |
this method is run when the server receives a "RNFR"
command from the client
cwd | the current working directory |
orig | the original literal argument passed by the client |
path | a reference to a string giving the normalized version of the path (normalized means that it is a complete path from "/" without any references to ".." or "."); the actual path can be changed by this method by modifying the value of the reference (and returning NOTHING to authorize the command) |
FTP-RESPONSE-ERROR | thrown if the argument has a value; set the exception arg value to an integer error code to override the default (550 ) |
|
private |
this method is run when the server receives a "RNFR"
command from the client
cwd | the current working directory |
orig | the original literal argument passed by the client |
path | a reference to a string giving the normalized version of the path (normalized means that it is a complete path from "/" without any references to ".." or "."); the actual path can be changed by this method by modifying the value of the reference (and returning NOTHING to authorize the command) |
FTP-RESPONSE-ERROR | thrown if the argument has a value; set the exception arg value to an integer error code to override the default (550 ) |
*string OMQ::AbstractFtpHandler::authSendFile | ( | string | cwd, |
string | orig, | ||
reference< string > | path | ||
) |
this method is run when the server receives a "RETR"
command from the client but before the server opens the data channel to receive the file; return no value if the server should accept the file, otherwise return a string that will be passed back to the client with a 500 error code rejecting the request
cwd | the current working directory |
orig | the original literal argument passed by the client |
path | a reference to a string giving the normalized path for the file that the client would like to receive from the server; the actual file name can be changed by this method by modifying the value of the reference (and returning NOTHING to authorize sending of the file) |
"STOR"
request; note that the default is to return no value and therefore accept the file from the client string OMQ::AbstractFtpHandler::authSendFile | ( | string | cwd, |
string | orig, | ||
string | path | ||
) |
this method is run when the server receives a "RETR"
command from the client but before the server opens the data channel to send the file
cwd | the current working directory |
orig | the original literal argument passed by the client |
path | the normalized path for the file that the client would like to receive from the server; the actual file name can be changed by this method by returning a path key in the response value |
FTP-RESPONSE-ERROR | thrown if the argument has a value |
arg
value to an integer error code to override the default (500
)
|
staticprivate |
Checks for an error response and throws an FTP-RESPONSE-ERROR
exception if found.
FTP-RESPONSE-ERROR | thrown if the argument has a value |
OMQ::AbstractFtpHandler::constructor | ( | *string | root, |
bool | bin = False , |
||
HttpServer::AbstractAuthenticator | auth = new DefaultQorusRBACAuthenticator() |
||
) |
creates the object with the given arguments
root | the root directory for file-based FTP handlers; if this argument is not set, then the filesystem is not directly accessed by this object; instead data will be provided or requested directly (see fileDataReceived()) |
bin | if True then each file received will be read in as a binary object (only has an effect when no root directory is set) |
auth | the HttpServer::AbstractAuthenticator for the object; if no argument is passed, then the system RBAC authenticator is used; meaning that Qorus application users are required to connect, and the users must have the OMQ::QR_LOGIN role to connect as well |
*string OMQ::AbstractFtpHandler::deleteFile | ( | string | cwd, |
string | orig, | ||
string | path | ||
) |
this method is run when the server receives a "DELE"
command from the client; return no value if the server should accept the request, otherwise return a string that will be passed back to the client with a 550 error code rejecting the request
cwd | the current working directory |
orig | the original literal argument passed by the client |
path | a string giving the normalized version of the path (normalized means that it is a complete path from "/" without any references to ".." or ".") |
FTP-RESPONSE-ERROR | thrown if the argument has a value; set the exception arg value to an integer error code to override the default (550 ) |
|
private |
this method is run when the server receives a "DELE"
command from the client
cwd | the current working directory |
orig | the original literal argument passed by the client |
path | a string giving the normalized version of the path (normalized means that it is a complete path from "/" without any references to ".." or ".") |
FTP-RESPONSE-ERROR | thrown if the argument has a value; set the exception arg value to an integer error code to override the default (550 ) |
OMQ::AbstractFtpHandler::fileDataReceived | ( | string | path, |
data | data | ||
) |
this method is called when the server has received a file and no root directory is set
path | the complete path of the file including the current working directory (starting from default "/" if the client did not issue any CWD commands) with the filename as given by the FTP client |
data | the file data; will be a string if bin is False, otherwise it will be a binary object |
OMQ::AbstractFtpHandler::fileReceived | ( | string | path | ) |
this method is called when the server has received a file
path | the complete path of the file that was saved to the filesystem including the current working directory (starting from default "/" if the client did not issue any CWD commands) with the filename as given by the FTP client; the path does not include the FTP handler base directory, so a path of "/" is based in the top-level directory of root |
OMQ::AbstractFtpHandler::fileSent | ( | string | path | ) |
this method is called when the server has sent a file
path | the complete path of the file that was sent including the current working directory (starting from default "/") with the filename as given by the FTP client; the path does not include the FTP handler base directory, so a path of "/" is based in the top-level directory of root |
string OMQ::AbstractFtpHandler::list | ( | string | cwd, |
*string | path | ||
) |
this method is run when the server receives a "LIST"
command from the client
cwd | the current working directory |
path | the original literal argument passed by the client |
FTP-RESPONSE-ERROR | thrown if the argument has a value; set the exception arg value to an integer error code to override the default (550 ) |
*string OMQ::AbstractFtpHandler::list | ( | string | cwd, |
*string | path, | ||
reference< string > | output | ||
) |
this method is run when the server receives a "LIST"
command from the client; return no value and set the output reference if the server should accept the request, otherwise return a string that will be passed back to the client with a 550 error code rejecting the request
cwd | the current working directory |
path | the original literal argument passed by the client |
output | assign an output string to this reference for the output to be returned to the client |
FTP-RESPONSE-ERROR | thrown if the argument has a value; set the exception arg value to an integer error code to override the default (550 ) |
|
private |
this method is run when the server receives a "LIST"
command from the client
cwd | the current working directory |
path | the original literal argument passed by the client |
FTP-RESPONSE-ERROR | thrown if the argument has a value; set the exception arg value to an integer error code to override the default (550 ) |
OMQ::AbstractFtpHandler::logDebug | ( | softstring | msg | ) |
writes the message to the service log file if the log level is equal or lower
OMQ::AbstractFtpHandler::logError | ( | softstring | msg | ) |
writes the message to the service log file if the log level is equal or lower
OMQ::AbstractFtpHandler::logFatal | ( | softstring | msg | ) |
writes the message to the service log file if the log level is equal or lower
OMQ::AbstractFtpHandler::logInfo | ( | softstring | msg | ) |
writes the message to the service log file if the log level is equal or lower
OMQ::AbstractFtpHandler::logTrace | ( | softstring | msg | ) |
writes the message to the service log file if the log level is equal or lower
OMQ::AbstractFtpHandler::logWarn | ( | softstring | msg | ) |
writes the message to the service log file if the log level is equal or lower
string OMQ::AbstractFtpHandler::machineListDir | ( | string | cwd, |
*string | orig, | ||
string | path | ||
) |
this method is run when the server receives a "MLSD"
command from the client
cwd | the current working directory |
orig | the original literal argument passed by the client |
path | a string giving the normalized version of the path argument (normalized means that it is a complete path from "/" without any references to ".." or ".") |
FTP-RESPONSE-ERROR | thrown if the argument has a value; set the exception arg value to an integer error code to override the default (501 or 550 ) |
*string OMQ::AbstractFtpHandler::machineListDir | ( | string | cwd, |
*string | orig, | ||
string | path, | ||
*reference< string > | output, | ||
*reference< bool > | isdir | ||
) |
this method is run when the server receives a "MLSD"
command from the client; return no value and set the output reference if the server should accept the request, otherwise return a string that will be passed back to the client with a 550 error code rejecting the request
cwd | the current working directory |
orig | the original literal argument passed by the client |
path | a string giving the normalized version of the path argument (normalized means that it is a complete path from "/" without any references to ".." or ".") |
output | assign an output string to this reference for the output to be returned to the client |
isdir | if False on output and there is an error response, then a 501 code will be generated instead of a 550 code |
|
private |
this method is run when the server receives a "MLSD"
command from the client
cwd | the current working directory |
orig | the original literal argument passed by the client |
path | a string giving the normalized version of the path argument (normalized means that it is a complete path from "/" without any references to ".." or ".") |
FTP-RESPONSE-ERROR | thrown if the argument has a value; set the exception arg value to an integer error code to override the default (501 or 550 ) |
string OMQ::AbstractFtpHandler::machineListFile | ( | string | cwd, |
*string | orig, | ||
string | path | ||
) |
this method is run when the server receives a "MLST"
command from the client
cwd | the current working directory |
orig | the original literal argument passed by the client |
path | a string giving the normalized version of the path argument (normalized means that it is a complete path from "/" without any references to ".." or ".") |
FTP-RESPONSE-ERROR | thrown if the argument has a value; set the exception arg value to an integer error code to override the default (550 ) |
*string OMQ::AbstractFtpHandler::machineListFile | ( | string | cwd, |
*string | orig, | ||
string | path, | ||
reference< string > | output | ||
) |
this method is run when the server receives a "MLST"
command from the client; return no value and set the output reference if the server should accept the request, otherwise return a string that will be passed back to the client with a 550 error code rejecting the request
cwd | the current working directory |
orig | the original literal argument passed by the client |
path | a string giving the normalized version of the path argument (normalized means that it is a complete path from "/" without any references to ".." or ".") |
output | assign an output string to this reference for the output to be returned to the client |
FTP-RESPONSE-ERROR | thrown if the argument has a value; set the exception arg value to an integer error code to override the default (550 ) |
|
private |
this method is run when the server receives a "MLST"
command from the client
cwd | the current working directory |
orig | the original literal argument passed by the client |
path | a string giving the normalized version of the path argument (normalized means that it is a complete path from "/" without any references to ".." or ".") |
FTP-RESPONSE-ERROR | thrown if the argument has a value; set the exception arg value to an integer error code to override the default (550 ) |
*string OMQ::AbstractFtpHandler::makeDir | ( | string | cwd, |
string | orig, | ||
string | path | ||
) |
this method is run when the server receives a "MKD"
command from the client; return no value if the server should accept the request, otherwise return a string that will be passed back to the client with a 550 error code rejecting the request
cwd | the current working directory |
orig | the original literal argument passed by the client |
path | a string giving the normalized version of the path (normalized means that it is a complete path from "/" without any references to ".." or ".") |
FTP-RESPONSE-ERROR | thrown if the argument has a value; set the exception arg value to an integer error code to override the default (550 ) |
|
private |
this method is run when the server receives a "MKD"
command from the client; return no value if the server should accept the request, otherwise return a string that will be passed back to the client with a 550 error code rejecting the request
cwd | the current working directory |
orig | the original literal argument passed by the client |
path | a string giving the normalized version of the path (normalized means that it is a complete path from "/" without any references to ".." or ".") |
FTP-RESPONSE-ERROR | thrown if the argument has a value; set the exception arg value to an integer error code to override the default (550 ) |
date OMQ::AbstractFtpHandler::modifiedTime | ( | string | cwd, |
string | orig, | ||
string | path | ||
) |
this method is called when the "MDTM"
command is received
cwd | the current working directory |
orig | the original literal argument passed by the client |
path | the complete path of the file including the current working directory (starting from default "/") with the filename as given by the FTP client |
FTP-RESPONSE-ERROR | thrown if the argument has a value; set the exception arg value to an integer error code to override the default (550 ) |
*string OMQ::AbstractFtpHandler::modifiedTime | ( | string | cwd, |
string | orig, | ||
string | path, | ||
reference< date > | mdate | ||
) |
this method is called when the "MDTM"
command is received
cwd | the current working directory |
orig | the original literal argument passed by the client |
path | the complete path of the file including the current working directory (starting from default "/") with the filename as given by the FTP client |
mdate | a reference to a date for the last modified date of the file (output variable) |
FTP-RESPONSE-ERROR | thrown if the argument has a value; set the exception arg value to an integer error code to override the default (550 ) |
|
private |
this method is called when the "MDTM"
command is received
cwd | the current working directory |
orig | the original literal argument passed by the client |
path | the complete path of the file including the current working directory (starting from default "/") with the filename as given by the FTP client |
FTP-RESPONSE-ERROR | thrown if the argument has a value; set the exception arg value to an integer error code to override the default (500 ) |
string OMQ::AbstractFtpHandler::nlst | ( | string | cwd, |
*string | path | ||
) |
this method is run when the server receives a "NLST"
command from the client; return no value and set the output reference if the server should accept the request, otherwise return a string that will be passed back to the client with a 550 error code rejecting the request
cwd | the current working directory |
path | the original literal argument passed by the client |
FTP-RESPONSE-ERROR | thrown if the argument has a value; set the exception arg value to an integer error code to override the default (550 ) |
*string OMQ::AbstractFtpHandler::nlst | ( | string | cwd, |
*string | path, | ||
reference< string > | output | ||
) |
this method is run when the server receives a "NLST"
command from the client; return no value and set the output reference if the server should accept the request, otherwise return a string that will be passed back to the client with a 550 error code rejecting the request
cwd | the current working directory |
path | the original literal argument passed by the client |
output | assign an output string to this reference for the output to be returned to the client |
FTP-RESPONSE-ERROR | thrown if the argument has a value; set the exception arg value to an integer error code to override the default (550 ) |
|
private |
this method is run when the server receives a "NLST"
command from the client; return no value and set the output reference if the server should accept the request, otherwise return a string that will be passed back to the client with a 550 error code rejecting the request
cwd | the current working directory |
path | the original literal argument passed by the client |
FTP-RESPONSE-ERROR | thrown if the argument has a value; set the exception arg value to an integer error code to override the default (550 ) |
*string OMQ::AbstractFtpHandler::removeDir | ( | string | cwd, |
string | orig, | ||
string | path | ||
) |
this method is run when the server receives a "RMD"
command from the client; return no value if the server should accept the request, otherwise return a string that will be passed back to the client with a 550 error code rejecting the request
cwd | the current working directory |
orig | the original literal argument passed by the client |
path | a string giving the normalized version of the path (normalized means that it is a complete path from "/" without any references to ".." or ".") |
FTP-RESPONSE-ERROR | thrown if the argument has a value; set the exception arg value to an integer error code to override the default (550 ) |
|
private |
this method is run when the server receives a "RMD"
command from the client; return no value if the server should accept the request, otherwise return a string that will be passed back to the client with a 550 error code rejecting the request
cwd | the current working directory |
orig | the original literal argument passed by the client |
path | a string giving the normalized version of the path (normalized means that it is a complete path from "/" without any references to ".." or ".") |
FTP-RESPONSE-ERROR | thrown if the argument has a value; set the exception arg value to an integer error code to override the default (550 ) |
*string OMQ::AbstractFtpHandler::rename | ( | string | cwd, |
string | orig_to, | ||
string | from, | ||
string | to | ||
) |
this method is run when the server receives a "RNTO"
command from the client; return no value if the server should accept the request (and thie method has already effected the rename of the file), otherwise return a string that will be passed back to the client with a 550 error code rejecting the request
cwd | the current working directory |
orig_to | the original literal argument passed by the client |
from | a string giving the normalized version of the "from" (source) path (normalized means that it is a complete path from "/" without any references to ".." or ".") |
to | a string giving the normalized version of the "to" (target) path (normalized means that it is a complete path from "/" without any references to ".." or ".") |
FTP-RESPONSE-ERROR | thrown if the argument has a value; set the exception arg value to an integer error code to override the default (550 ) |
|
private |
this method is run when the server receives a "RNTO"
command from the client; return no value if the server should accept the request (and thie method has already effected the rename of the file), otherwise return a string that will be passed back to the client with a 550 error code rejecting the request
cwd | the current working directory |
orig_to | the original literal argument passed by the client |
from | a string giving the normalized version of the "from" (source) path (normalized means that it is a complete path from "/" without any references to ".." or ".") |
to | a string giving the normalized version of the "to" (target) path (normalized means that it is a complete path from "/" without any references to ".." or ".") |
FTP-RESPONSE-ERROR | thrown if the argument has a value; set the exception arg value to an integer error code to override the default (550 ) |
data OMQ::AbstractFtpHandler::sendFile | ( | string | path | ) |
this method is called when the server should send a file
path | the complete path of the file including the current working directory (starting from default "/") with the filename as given by the FTP client |
int OMQ::AbstractFtpHandler::size | ( | string | cwd, |
string | orig, | ||
string | path | ||
) |
this method is called when the "SIZE"
command is received
cwd | the current working directory |
orig | the original literal argument passed by the client |
path | the complete path of the file including the current working directory (starting from default "/") with the filename as given by the FTP client |
FTP-RESPONSE-ERROR | thrown if the argument has a value; set the exception arg value to an integer error code to override the default (550 ) |
*string OMQ::AbstractFtpHandler::size | ( | string | cwd, |
string | orig, | ||
string | path, | ||
reference< int > | size | ||
) |
this method is called when the "SIZE"
command is received
cwd | the current working directory |
orig | the original literal argument passed by the client |
path | the complete path of the file including the current working directory (starting from default "/") with the filename as given by the FTP client |
size | a reference to an int for the file size (output variable) |
FTP-RESPONSE-ERROR | thrown if the argument has a value; set the exception arg value to an integer error code to override the default (550 ) |
|
private |
this method is called when the "SIZE"
command is received
cwd | the current working directory |
orig | the original literal argument passed by the client |
path | the complete path of the file including the current working directory (starting from default "/") with the filename as given by the FTP client |
bool OMQ::AbstractFtpHandler::bin |
if False (the default), then files are received as strings, if True, then as binary objects
this only affects how file data is passed to the fileDataReceived() method
list<auto> OMQ::AbstractFtpHandler::listeners = () |
list of listener info
do not write to this list directly, use AbstractFtpHandler::addListener() instead (the internal format may change)
*string OMQ::AbstractFtpHandler::root |
the root directory for file-based FTP servers
if no value is set, then the file data will be passed to the fileDataReceived() method instead