File FtpAgApp.lua
Functions
| FtpAgApp:endOfJob (srvcName, jobNum, taskNum, jobDir, index) | End job distinguished by directory. |
| FtpAgApp:getPresence (tmo, fromName) | Returns lower case string indicative of whether app is responding to "hello" message. |
| FtpAgApp:new (t) | Constructor for new instance. |
| FtpAgApp:newClass (t) | Constructor for extending class. |
| FtpAgApp:processMessage (msg) | Processor for incoming (unsolicited) messages. |
| FtpAgApp:purgeFile (srvcName, file, jobNum, taskNum, jobDir, index) | Purge a file as part of job distinguished by directory. |
| FtpAgApp:purgeFolder (srvcName, file, jobNum, taskNum, jobDir, index) | Purge a folder as part of job distinguished by directory. |
| FtpAgApp:setMessageCallback (callbackFuncOrMeth, callbackObj) | Set custom callback for unsolicited messages. |
| FtpAgApp:uploadFile (srvcName, file, jobNum, taskNum, jobDir, index) | Upload a file as part of job distinguished by directory. |
Functions
- FtpAgApp:endOfJob (srvcName, jobNum, taskNum, jobDir, index)
-
End job distinguished by directory.
Parameters:
-
srvcName: -
jobNum: -
taskNum: -
jobDir: (string, required) path to jobdir to place "ref" file. -
index: (number, required) command sequence number.
-
- FtpAgApp:getPresence (tmo, fromName)
-
Returns lower case string indicative of whether app is responding to "hello" message.
Parameters:
-
tmo: -
fromName:
Return values:
- query-status
- app-status
- more-info
-
- FtpAgApp:new (t)
-
Constructor for new instance.
Parameters:
-
t:
Usage:
pass pref-name, win-exe-name, or mac-pathed-name, if desired, else rely on defaults (but know what they are - see code).
-
- FtpAgApp:newClass (t)
-
Constructor for extending class.
Parameters:
-
t:
-
- FtpAgApp:processMessage (msg)
-
Processor for incoming (unsolicited) messages.
Parameters:
-
msg: message
Usage:
simply logs received comment unless error - which gets alert/log treatment.
calling context can set it's own callback
-
- FtpAgApp:purgeFile (srvcName, file, jobNum, taskNum, jobDir, index)
-
Purge a file as part of job distinguished by directory.
Parameters:
-
srvcName: -
file: (string, required) path to local file to upload. -
jobNum: -
taskNum: -
jobDir: (string, required) path to jobdir to place "ref" file. -
index: (number, required) command sequence number.
-
- FtpAgApp:purgeFolder (srvcName, file, jobNum, taskNum, jobDir, index)
-
Purge a folder as part of job distinguished by directory.
Parameters:
-
srvcName: -
file: (string, required) path to local file to upload. -
jobNum: -
taskNum: -
jobDir: (string, required) path to jobdir to place "ref" file. -
index: (number, required) command sequence number.
-
- FtpAgApp:setMessageCallback (callbackFuncOrMeth, callbackObj)
-
Set custom callback for unsolicited messages.
Parameters:
-
callbackFuncOrMeth: -- function (or method) to call (required) - passing message object as only parameter. -
callbackObj: -- object (optional) in which case the previously mentioned will be called as object method.
Usage:
Be careful to handl all possbilities, and try not to stomp on other callbacks..
Return values:
- previous callback func-or-meth (nil if none).
- previous callback obj(ect) (nil if none).
-
- FtpAgApp:uploadFile (srvcName, file, jobNum, taskNum, jobDir, index)
-
Upload a file as part of job distinguished by directory.
Parameters:
-
srvcName: -
file: (string, required) path to local file to upload. -
jobNum: -
taskNum: -
jobDir: (string, required) path to jobdir to place "ref" file. -
index: (number, required) command sequence number.
-