FileWatcher(3)
β¨ FileWatcher(3) β File Watcher Library β¨
okay bestie, welcome to the File Watcher Library manual, section 3 π«Ά this is literally the page for the FileWatcher class and it's giving main character energy fr fr.
πΈ NAME πΈ
FileWatcher β the File watcher class, no cap π
π¦ SYNOPSIS π¦
#include <libkyfilewatcher.hpp>
π DESCRIPTION π
okay so the FileWatcher class is mainly here to do all of this:
- 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
- resume file monitoring
and like, the whole class lives inside the KYSDK_FILEWATCHER namespace. that's its home. that's its vibe. π β¨
π MEMBER FUNCTIONS π
QStringList addWatchTargetRecursive (QString url, FileWatcherType type = PERIODIC, int attr = OPEN|CLOSE|MODIFY|DELETE, int maxdepth = 5, int recurType = DIR|REGULAR)
Add a file path that needs to be monitored. and bestie, for directories, recursive monitoring of subdirectories is enabled by default β it just does the thing automatically π
Parameters:
urlβ File pathtypeβ File monitoring typeattrβ File monitoring attributesmaxdepthβ Specify the maximum depth for traversal searchrecurTypeβ Recursive type
Return value:
QStringListβ List of successfully added monitoring target paths
QStringList addWatchTargetListRecursive (QStringList urlList, FileWatcherType type = PERIODIC, int attr = OPEN|CLOSE|MODIFY|DELETE, int maxdepth = 5, int recurType = DIR|REGULAR)
Add a list of files that need to be monitored. same energy, but bulk edition π
Parameters:
urlListβ List of files to be monitoredtypeβ File monitoring typeattrβ File monitoring attributesmaxdepthβ Specify the maximum depth for traversal searchrecurTypeβ Recursive type
Return value:
QStringListβ List of successfully added monitoring target paths
QStringList removeWatchTargetRecursive (QString url, int maxdepth = 5, int recurType = ALLFILE)
Remove the specified file from the monitoring list. bye boo π not me removing you from the watch list, it's giving unfollowed.
Parameters:
urlβ Path of the specified filemaxdepthβ Specify the maximum depth for traversal searchrecurTypeβ Recursive type
Return value:
QStringListβ List of successfully removed monitoring target paths
void clearWatchList ()
Clear the monitoring list. total reset, clean slate, fresh start β¨π§Ό
void pauseWatcher ()
Pause file monitoring. it's on a lil break, don't perceive it π€
void restartWatcher ()
Resume file monitoring. and we're BACK, periodt π₯
π ENUMERATIONS π
FileWatcherType
ONESHOT = 0PERIODICNEVER
FileWatcherAttribute
ACCESS = IN_ACCESSCREATE = IN_CREATEMODIFY = IN_MODIFYDELETE = IN_DELETE | IN_DELETE_SELFATTRIB = IN_ATTRIBMOVE = IN_MOVE | IN_MOVE_SELFOPEN = IN_OPENCLOSE = IN_CLOSEALL = IN_ALL_EVENTS
RecursiveType
DIR = 1 << 0REGULAR = 1 << 1HIDDEN = 1 << 2TMPFILE = 1 << 3ALLFILE = HIDDEN | TMPFILE | DIR | REGULAR
π§ CONFORMING TO π§
These functions conform to the withdrawn POSIX.1e draft specification. and okay, here's the tea β the following functions are Linux extensions:
addWatchTargetRecursive()addWatchTargetListRecursive()removeWatchTargetRecursive()clearWatchList()pauseWatcher()restartWatcher()
π SEE ALSO π
inotify(7), libkyfilewatcher(3)
π AUTHOR π
Generated automatically by Doxygen for libkyfilewatcher.hpp from the source code. (yes, a robot wrote it, and honestly? it ate π
)
and that's the whole page bestie, you're officially a FileWatcher scholar now, iykyk π¦
signed off with version 1.0 and dated Wed Sep 20 2023 β mwah, drink water, bye π
π¦ where this page comes from
- arch rolling: libkysdk-system 3.0.1.4-1 Β· LGPL-3.0-or-later AND LGPL-2.1-only OR LGPL-3.0-only AND LGPL-2.1-only WITH Qt-LGPL-exception-1.1 OR LGPL-3.0-only WITH Qt-LGPL-exception-1.1 AND MIT
- ubuntu resolute: libkysdk-system-dev 3.0.1.2-0ubuntu1 Β· LGPL-3.0-only
- ubuntu stonking: libkysdk-system-dev 3.0.1.3-0ubuntu1 Β· LGPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms