.TH FileWatcher 3 "Wed Sep 20 2023" "1.0" "File Watcher Library" .SH NAME FileWatcher \- File watcher class .SH SYNOPSIS .nf .B #include .fi .SH DESCRIPTION .PP The .B FileWatcher class is mainly used to add file paths that need to be monitored, add file lists that need to be monitored, remove specified files from the monitoring list, clear the monitoring list, pause file monitoring, and resume file monitoring. .PP This class belongs to the .BR KYSDK_FILEWATCHER namespace. .SH "MEMBER FUNCTIONS" .PP .B "QStringList addWatchTargetRecursive (QString url, FileWatcherType type = PERIODIC, int attr = OPEN|CLOSE|MODIFY|DELETE, int maxdepth = 5, int recurType = DIR|REGULAR)" .RS .PP Add a file path that needs to be monitored. For directories, recursive monitoring of subdirectories is enabled by default. .PP .B Parameters: .RS .TP .B url File path .TP .B type File monitoring type .TP .B attr File monitoring attributes .TP .B maxdepth Specify the maximum depth for traversal search .TP .B recurType Recursive type .RE .PP .B Return value: .RS .TP .B QStringList List of successfully added monitoring target paths .RE .RE .PP .B "QStringList addWatchTargetListRecursive (QStringList urlList, FileWatcherType type = PERIODIC, int attr = OPEN|CLOSE|MODIFY|DELETE, int maxdepth = 5, int recurType = DIR|REGULAR)" .RS .PP Add a list of files that need to be monitored. .PP .B Parameters: .RS .TP .B urlList List of files to be monitored .TP .B type File monitoring type .TP .B attr File monitoring attributes .TP .B maxdepth Specify the maximum depth for traversal search .TP .B recurType Recursive type .RE .PP .B Return value: .RS .TP .B QStringList List of successfully added monitoring target paths .RE .RE .PP .B "QStringList removeWatchTargetRecursive (QString url, int maxdepth = 5, int recurType = ALLFILE)" .RS .PP Remove the specified file from the monitoring list. .PP .B Parameters: .RS .TP .B url Path of the specified file .TP .B maxdepth Specify the maximum depth for traversal search .TP .B recurType Recursive type .RE .PP .B Return value: .RS .TP .B QStringList List of successfully removed monitoring target paths .RE .RE .PP .B "void clearWatchList ()" .RS .PP Clear the monitoring list. .RE .PP .B "void pauseWatcher ()" .RS .PP Pause file monitoring. .RE .PP .B "void restartWatcher ()" .RS .PP Resume file monitoring. .RE .SH "ENUMERATIONS" .PP .B FileWatcherType .RS .PP .nf ONESHOT = 0 PERIODIC NEVER .fi .RE .PP .B FileWatcherAttribute .RS .PP .nf ACCESS = IN_ACCESS CREATE = IN_CREATE MODIFY = IN_MODIFY DELETE = IN_DELETE | IN_DELETE_SELF ATTRIB = IN_ATTRIB MOVE = IN_MOVE | IN_MOVE_SELF OPEN = IN_OPEN CLOSE = IN_CLOSE ALL = IN_ALL_EVENTS .fi .RE .PP .B RecursiveType .RS .PP .nf DIR = 1 << 0 REGULAR = 1 << 1 HIDDEN = 1 << 2 TMPFILE = 1 << 3 ALLFILE = HIDDEN | TMPFILE | DIR | REGULAR .fi .RE .SH "CONFORMING TO" These functions conform to the withdrawn POSIX.1e draft specification. The following functions are Linux extensions: .BR addWatchTargetRecursive (), .BR addWatchTargetListRecursive (), .BR removeWatchTargetRecursive (), .BR clearWatchList (), .BR pauseWatcher () and .BR restartWatcher (). .SH "SEE ALSO" .BR inotify (7), .BR libkyfilewatcher (3) .SH AUTHOR Generated automatically by Doxygen for libkyfilewatcher.hpp from the source code.