119 const RequiredKeys = (
125 const RequiredKeysWithHost = RequiredKeys +
"host";
136 "check_file":
"qore-sftp-check-file",
140 const OptionalKeys = (
141 "path",
"user",
"pass",
"keyfile",
"regex_mask",
"minage",
142 "encoding",
"log_info",
"log_detail",
"log_debug",
"binary",
145 "skip_file_content_retrieval",
149 const AllKeys = RequiredKeysWithHost + Defaults.keys() + OptionalKeys;
152 const ErrorDelay = 1m;
188 bool runflag = False;
315 constructor(hash nconf);
336 logDetail(
string fmt);
343 logDebug(
string fmt);
361 int getStoreFile(
string remote_path,
string local_path, *timeout n_timeout);
365 string getTextFile(
string path, *timeout n_timeout, *
string n_encoding);
369 binary getFile(
string path, *timeout n_timeout);
373 rename(
string old,
string nnew, *timeout n_timeout);
377 removeFile(
string fn, *timeout n_timeout);
381 *hash stat(
string path, *timeout n_timeout);
388 checkRemotePath(
string path,
bool write = False, *timeout n_timeout);
406 list getFiles(
int sort = SftpPoller::SortNone,
int order = SftpPoller::OrderAsc);
453 sftpSleep(softint secs);
465 *
bool fileEvent(list l);
482 abstract singleFileEvent(hash fih);
502 abstract postSingleFileEvent(hash fih);
508 static checkPath(
string path,
string type,
bool write = False);
*string pass
password; one of "pass" or "keyfile" *must* be set
Definition: SftpPoller.qm.dox.h:170
int port
port
Definition: SftpPoller.qm.dox.h:161
string rootSftpPath
path after connect to SFTP server
Definition: SftpPoller.qm.dox.h:179
*code log_info
optional info log closure
Definition: SftpPoller.qm.dox.h:224
*code log_detail
optional detail log closure
Definition: SftpPoller.qm.dox.h:227
main SftpPoller namespace
Definition: SftpPoller.qm.dox.h:101
*code sleep
optional sleep closure
Definition: SftpPoller.qm.dox.h:236
string host
host or address name
Definition: SftpPoller.qm.dox.h:158
*softint minage
minimum file age
Definition: SftpPoller.qm.dox.h:218
*string encoding
file encoding for text files
Definition: SftpPoller.qm.dox.h:221
Qore::SSH2::SFTPClient sftp
SFTPClient object.
Definition: SftpPoller.qm.dox.h:212
string check_file
name of check writable file
Definition: SftpPoller.qm.dox.h:245
string url
url
Definition: SftpPoller.qm.dox.h:167
*string keyfile
path to the ssh private key in PEM format; one of "pass" or "keyfile" *must* be set ...
Definition: SftpPoller.qm.dox.h:173
*bool skip_file_content_retrieval
whether or not to skip the file content retrieval in runOnce()
Definition: SftpPoller.qm.dox.h:248
string user
user
Definition: SftpPoller.qm.dox.h:164
bool get_files
internal "get files" flag
Definition: SftpPoller.qm.dox.h:191
*code start_thread
optional start thread closure
Definition: SftpPoller.qm.dox.h:233
*string mask
file glob name mask (ignored if "regex_mask" also set)
Definition: SftpPoller.qm.dox.h:182
int tid
polling tid
Definition: SftpPoller.qm.dox.h:203
bool writable
chech if path is writable for others in constructor
Definition: SftpPoller.qm.dox.h:242
*code log_debug
optional debug log closure
Definition: SftpPoller.qm.dox.h:230
int poll_interval
poll interval in seconds
Definition: SftpPoller.qm.dox.h:185
bool binary
binary transfer flag (for singleFileEvent())
Definition: SftpPoller.qm.dox.h:239
timeout timeout
timeout in ms
Definition: SftpPoller.qm.dox.h:206