.TH "clearWatchList" 3 "Wed Sep 20 2023" "My Project" \" -*- nroff -*- .ad l .nh .SH NAME clearWatchList - 清空监听列表 .SH SYNOPSIS .nf .B #include .sp .SS "Classes" .in +1c .ti -1c .RI "class \fBKYSDK_FILEWATCHER::FileWatcher\fP" .in -1c .sp .SS "Functions" .in +1c .ti -1c .RI "void clearWatchList();" .in -1c .sp Link with \fI\-lkyfilewatcher\fP. .SH "Detailed Description" The main function of the interface is to clear listening list. .SH "RETURN VALUE" No return value .SH EXAMPLES .EX #include #include #include "libkyfilewatcher.hpp" using namespace KYSDK_FILEWATCHER; int main(int argc, char *argv[]) { KYSDK_FILEWATCHER::FileWatcher watcher; watcher.addWatchTargetRecursive("/home/kylin/", PERIODIC, ALL, 3, REGULAR); getchar(); // qDebug() << "update attr test"; // watcher.updateWatchTargetAttribute("/data/testcode/test.c", DELETE); // getchar(); // qDebug() << "re-add test"; // watcher.addWatchTarget("/data/testcode/test.c", PERIODIC, ALL); // getchar(); // qDebug() << "update oneshot test"; // watcher.updateWatchTargetType("/data/testcode/test.c", ONESHOT); // getchar(); // qDebug() << "remove target test"; // watcher.removeWatchTarget("/data/testcode/test.c"); // getchar(); watcher.clearWatchList(); return 0; } .SH "CONFORMING TO" These functions are as per the withdrawn POSIX.1e draft specification. The following functions are Linux extensions: .BR addWatchTargetRecursive (), .BR addWatchTargetListRecursive (), .BR removeWatchTargetRecursive (), .BR pauseWatcher () and .BR restartWatcher (). .SH "SEE ALSO" .BR addWatchTargetRecursive (3), .BR addWatchTargetListRecursive (3), .BR removeWatchTargetRecursive (3), .BR pauseWatcher (3) and .BR restartWatcher (3).