118 const RequiredKeys = (
124 const RequiredKeysWithHost = RequiredKeys +
"host";
135 "check_file":
"qore-sftp-check-file",
139 const OptionalKeys = (
140 "path",
"user",
"pass",
"keyfile",
"regex_mask",
"minage",
141 "encoding",
"log_info",
"log_detail",
"log_debug",
"binary",
147 const AllKeys = RequiredKeysWithHost + Defaults.keys() + OptionalKeys;
150 const ErrorDelay = 1m;
186 bool runflag = False;
275 constructor(Qore::SSH2::SFTPClient n_sftp, hash nconf);
309 constructor(hash nconf);
321 private logInfo(
string fmt);
325 private logDetail(
string fmt);
329 private logDebug(
string fmt);
343 int getStoreFile(
string remote_path,
string local_path, *timeout n_timeout);
347 string getTextFile(
string path, *timeout n_timeout, *
string n_encoding);
351 binary getFile(
string path, *timeout n_timeout);
355 rename(
string old,
string nnew, *timeout n_timeout);
359 removeFile(
string fn, *timeout n_timeout);
363 *hash stat(
string path, *timeout n_timeout);
370 checkRemotePath(
string path,
bool write = False, *timeout n_timeout);
388 list getFiles(
int sort = SftpPoller::SortNone,
int order = SftpPoller::OrderAsc);
433 private sftpSleep(softint secs);
441 *
bool fileEvent(list l);
458 abstract singleFileEvent(hash fih);
478 abstract postSingleFileEvent(hash fih);
484 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:168
int port
port
Definition: SftpPoller.qm.dox.h:159
string rootSftpPath
path after connect to SFTP server
Definition: SftpPoller.qm.dox.h:177
*code log_info
optional info log closure
Definition: SftpPoller.qm.dox.h:222
*code log_detail
optional detail log closure
Definition: SftpPoller.qm.dox.h:225
main SftpPoller namespace
Definition: SftpPoller.qm.dox.h:100
*code sleep
optional sleep closure
Definition: SftpPoller.qm.dox.h:234
string host
host or address name
Definition: SftpPoller.qm.dox.h:156
*softint minage
minimum file age
Definition: SftpPoller.qm.dox.h:216
*string encoding
file encoding for text files
Definition: SftpPoller.qm.dox.h:219
Qore::SSH2::SFTPClient sftp
SFTPClient object.
Definition: SftpPoller.qm.dox.h:210
string check_file
name of check writable file
Definition: SftpPoller.qm.dox.h:243
string url
url
Definition: SftpPoller.qm.dox.h:165
*string keyfile
path to the ssh private key in PEM format; one of "pass" or "keyfile" *must* be set ...
Definition: SftpPoller.qm.dox.h:171
string user
user
Definition: SftpPoller.qm.dox.h:162
bool get_files
internal "get files" flag
Definition: SftpPoller.qm.dox.h:189
*code start_thread
optional start thread closure
Definition: SftpPoller.qm.dox.h:231
*string mask
file glob name mask (ignored if "regex_mask" also set)
Definition: SftpPoller.qm.dox.h:180
int tid
polling tid
Definition: SftpPoller.qm.dox.h:201
bool writable
chech if path is writable for others in constructor
Definition: SftpPoller.qm.dox.h:240
*code log_debug
optional debug log closure
Definition: SftpPoller.qm.dox.h:228
int poll_interval
poll interval in seconds
Definition: SftpPoller.qm.dox.h:183
bool binary
binary transfer flag (for singleFileEvent())
Definition: SftpPoller.qm.dox.h:237
timeout timeout
timeout in ms
Definition: SftpPoller.qm.dox.h:204