FTPworker

External objects

Properties Methods 

Properties

$alwaysfinishIf true,the worker allows an asynchronous request to run to completion even if the instance containing the worker closes
$callbackinstThe instance to which the worker object sends messages,for example when its processing has completed or has been cancelled.If you do not assign an instance to $callbackinst the worker object sends messages to itself
$callprogressIf true,the worker periodically generates a notification to $progress as it executes.Defaults to false
$curloptionsUse this property to set internal CURL options not otherwise exposed by the worker.A 2 column list,where column 1 is a number (the CURL easy option number) and column 2 is a string.The internal option must be an integer or string value
$errorcodeError code associated with the last action (zero means no error)
$errortextError text associated with the last action (empty means no error)
$keepconnectionopenIf true,the worker can leave the connection to the server open when it completes its request.Defaults to false.Note that even when this property is set to true,a protocol error may cause the connection to close
$protocollogIf non-zero,the worker adds a log of protocol activity as a column named log to its wResults row.Defaults to kOW3logNone.Otherwise,a sum of kOW3log... constants
$requiresecureconnectionIf true,and the URI is not a secure URI,the connection starts as a non-secure connection which must be upgraded to a secure connection (using STARTTLS or STLS).If it cannot be upgraded then the request fails.Defaults to false
$responsepathIf not empty,the worker writes response content to the file with this path rather then adding it to the wResults row.The file must not already exist.Defaults to empty
$servercharsetThe character set used by the server to encode file names in commands and file lists.Default kUniTypeAuto (meaning UTF-8 if server supports it or kUniTypeNativeCharacters if not).Otherwise a kUniType... constant for 8 bit character sets
kUniTypeAnsiArabic kUniTypeAnsiBaltic kUniTypeAnsiCentralEuropean kUniTypeAnsiCyrillic kUniTypeAnsiGreek kUniTypeAnsiHebrew kUniTypeAnsiLatin1 kUniTypeAnsiThai kUniTypeAnsiTurkish kUniTypeAnsiVietnamese kUniTypeAuto kUniTypeBinary kUniTypeCharacter kUniTypeISO8859_1 kUniTypeISO8859_10 kUniTypeISO8859_11 kUniTypeISO8859_13 kUniTypeISO8859_14 kUniTypeISO8859_15 kUniTypeISO8859_16 kUniTypeISO8859_2 kUniTypeISO8859_3 kUniTypeISO8859_4 kUniTypeISO8859_5 kUniTypeISO8859_6 kUniTypeISO8859_7 kUniTypeISO8859_8 kUniTypeISO8859_9 kUniTypeNativeCharacters kUniTypeOEM kUniTypeUTF16 kUniTypeUTF16BE kUniTypeUTF16LE kUniTypeUTF32 kUniTypeUTF32BE kUniTypeUTF32LE kUniTypeUTF8
$sshauthtypesA sum of kOW3sshAuthType... constants (default kOW3sshAuthTypePublicKey+kOW3sshAuthTypePassword+kOW3sshAuthTypeHost+kOW3sshAuthTypeAgent) specifying the allowed authentication types when establishing a connection to the server
$sshenablecompressionIf true,SSH compression is enabled for SFTP connections,resulting in a request to the server to enable compression;the server may ignore the request.Defaults to false
$sshknownhostsactionA sum of kOW3sshKHAction... constants (default kOW3sshKHActionReject) specifying what occurs if $sshknownhostsfile is present,and a connection is to be made to a server not in the file,or a server in the file with a host key mismatch
$sshknownhostsfileThe full pathname of the SSH known hosts file used for SFTP.Defaults to the path of clientserver/client/ow3_sftp_known_hosts in the Studio tree.Set this to empty to allow connections (insecurely) to any host
$stateA kWorkerState... constant that indicates the current state of the worker object
kWorkerStateCancelled kWorkerStateClear kWorkerStateComplete kWorkerStateInit kWorkerStateRunning
$threadcountThe number of active background threads for all instances of this type of worker object
$timeoutThe timeout (in seconds) for requests.Zero means requests do not time out.For the OAUTH2Worker defaults to 60 with a minimum value of 10;otherwise,defaults to 10 with a minimum value of zero

Methods

$cancel$cancel() If required,cancels execution of worker on background thread.Will not return until the request has been cancelled
$cancelled$cancelled() Method called when the request has been cancelled
$completed$completed(wResults) Method called when the request completes.wResults is a row containing the results of executing the request
$getsecureoptions$getsecureoptions([&bVerifyPeer,&bVerifyHost,&cCertFile,&cPrivKeyFile,&cPrivKeyPassword]) gets the options that affect how secure connections are established (the options do not apply to SFTP)
$getsshoptions$getsshoptions([&cServerPublicKeyMD5,&cClientPublicKeyFile,&cPrivKeyFile,&cPrivKeyPassword]) gets the options that affect how SSH connections are established for SFTP
$init$init(cURI,cUser,cPassword,iAction,cServerPath,vParam) Initialise the object so it is ready to perform the specified action using FTP.Returns true if successful
$progress$progress(wProgress) Method called during worker execution to report progress (see $callprogress property)
$run$run() Run worker on current thread.Returns true if the worker executed successfully
$setsecureoptions$setsecureoptions([bVerifyPeer=kTrue,bVerifyHost=kTrue,cCertFile='',cPrivKeyFile='',cPrivKeyPassword='']) sets the options that affect how secure connections are established (the options do not apply to SFTP)
$setsshoptions$setsshoptions([cServerPublicKeyMD5='',cClientPublicKeyFile='',cPrivKeyFile='',cPrivKeyPassword='']) sets the options that affect how SSH connections are established for SFTP
$start$start() Run worker on background thread.Returns true if the worker was successfully started