ewmscp
..
|
Functions | |
void | followInotifyWatchRequestProvider::followStream (std::istream &stream) override |
The InotifyWatch request provider takes the output of The inotify_watch command. to create copy requests.
The format of the inofify watch output is:
<cmd> <timestamp> <filename>
<cmd> is the two-character command, valid are
cp
to copy a file, rm
to remove a file and mv
to move (rename) a file. <timestamp> is a decimal double value as seconds since the epoch of the time that the event leading to the request happened, i.e. was seen by inotify_watch.
<filename> is the filename of the file to be copied/renamed/deleted, relative to the working directory. In the case of the
mv
command an additional line with the move target follows.
The end-of-line mark is by default the newline character, but if the -0
option is given it's the NUL
character.
ig
is a special tag for keepalive messages, which are ignored. They are needed to keep a ssh session from the inotify_watch node to the ewmscp node open.
Because some files tend to be changed quickly after a first close-after-write they should be processed in a delayed queue.
|
overrideprivatevirtual |
Implements followRequestProvider.
Definition at line 38 of file followInotifyWatchRequestProvider.cpp.
References statCollector::typed< T >::addValue(), errMsg::emit(), requestProvider::getDstPath(), followRequestProvider::handleMove(), followRequestProvider::handleOther(), errMsg::info, followRequestProvider::nullDelimiter, stopRequest::Requested(), and copyRequest::base::tEnqueueStat.