 |
Qore SftpPoller Module Reference
1.3
|
116 const RequiredKeys = (
122 const RequiredKeysWithHost = RequiredKeys +
"host";
133 "check_file":
"qore-sftp-check-file",
137 const OptionalKeys = (
138 "path",
"user",
"pass",
"keyfile",
"regex_mask",
"minage",
139 "encoding",
"log_info",
"log_detail",
"log_debug",
"binary",
142 "skip_file_content_retrieval",
146 const AllKeys = RequiredKeysWithHost + Defaults.keys() + OptionalKeys;
149 const ErrorDelay = 1m;
171 softlist<string> path =
".";
183 bool runflag = False;
310 constructor(hash<auto> nconf);
329 logDetail(
string fmt);
335 logDebug(
string fmt);
352 int getStoreFile(
string remote_path,
string local_path, *timeout n_timeout);
356 string getTextFile(
string path, *timeout n_timeout, *
string n_encoding);
360 binary getFile(
string path, *timeout n_timeout);
364 rename(
string old,
string nnew, *timeout n_timeout);
368 removeFile(
string fn, *timeout n_timeout);
372 *hash<Qore::SSH2::Ssh2StatInfo> stat(
string path, *timeout n_timeout);
379 checkRemotePath(
string path,
bool write = False, *timeout n_timeout);
397 list<hash<SftpPollerFileEventInfo>> getFiles(
int sort = SftpPoller::SortNone,
int order = SftpPoller::OrderAsc);
443 sftpSleep(softint secs);
454 *
bool fileEvent(list<hash<SftpPollerFileEventInfo>> l);
471 abstract singleFileEvent(hash<SftpPollerFileEventInfo> fih);
491 abstract postSingleFileEvent(hash<SftpPollerFileEventInfo> fih);
497 static checkPath(
string path,
string type,
bool write = False);
*code log_info
optional info log closure
Definition: SftpPoller.qm.dox.h:219
int poll_interval
poll interval in seconds
Definition: SftpPoller.qm.dox.h:180
string user
user
Definition: SftpPoller.qm.dox.h:159
*softint minage
minimum file age
Definition: SftpPoller.qm.dox.h:213
*string pass
password; one of "pass" or "keyfile" *must* be set
Definition: SftpPoller.qm.dox.h:165
string host
host or address name
Definition: SftpPoller.qm.dox.h:153
*string keyfile
path to the ssh private key in PEM format; one of "pass" or "keyfile" *must* be set
Definition: SftpPoller.qm.dox.h:168
*code sleep
optional sleep closure
Definition: SftpPoller.qm.dox.h:231
string url
url
Definition: SftpPoller.qm.dox.h:162
string rootSftpPath
path after connect to SFTP server
Definition: SftpPoller.qm.dox.h:174
*code start_thread
optional start thread closure
Definition: SftpPoller.qm.dox.h:228
*string encoding
file encoding for text files
Definition: SftpPoller.qm.dox.h:216
*string mask
file glob name mask (ignored if "regex_mask" also set)
Definition: SftpPoller.qm.dox.h:177
*code log_detail
optional detail log closure
Definition: SftpPoller.qm.dox.h:222
*bool skip_file_content_retrieval
whether or not to skip the file content retrieval in runOnce()
Definition: SftpPoller.qm.dox.h:243
main SftpPoller namespace
timeout timeout
timeout in ms
Definition: SftpPoller.qm.dox.h:201
bool writable
chech if path is writable for others in constructor
Definition: SftpPoller.qm.dox.h:237
int tid
polling tid
Definition: SftpPoller.qm.dox.h:198
string check_file
name of check writable file
Definition: SftpPoller.qm.dox.h:240
int port
port
Definition: SftpPoller.qm.dox.h:156
bool get_files
internal "get files" flag
Definition: SftpPoller.qm.dox.h:186
*code log_debug
optional debug log closure
Definition: SftpPoller.qm.dox.h:225
bool binary
binary transfer flag (for singleFileEvent())
Definition: SftpPoller.qm.dox.h:234
Qore::SSH2::SFTPClient sftp
SFTPClient object.
Definition: SftpPoller.qm.dox.h:207