restartWatcher(3)
💖 restartWatcher — 恢复文件监听 💖
okay bestie, welcome to the manual page for restartWatcher, a function from the libkyfilewatcher library (that's a Library Functions Manual situation, in case the vibe check matters). It's the little helper that goes "hey, the file listening stopped, let's bring it back" — we love a comeback arc. 👑
✨ NAME ✨
restartWatcher — 恢复文件监听
literally: "recover file listening". the watcher fell off? we pick it back up. that's the whole job. 💅
🌸 SYNOPSIS 🌸
#include <libkyfilewatcher.hpp>
🎀 Classes
class KYSDK_FILEWATCHER::FileWatcher
🦋 Functions
void restartWatcher();
Link with -lkyfilewatcher. yes bestie you have to actually link the library, it's not gonna manifest itself. ✨
💜 Detailed Description
The main character of this interface — the whole reason it exists — is to recover file listening. That's it. That's the plot. 📖
Recover. The. File. Listening. Say it with me. 🫶
⭐ RETURN VALUE
No return value. nope, nada, nothing, zero, zilch. it's a void, it does the thing and it does not report back to you. main character energy: it doesn't explain itself. 💀
🌈 EXAMPLES
here's the whole demo, copied character for character because we do not freestyle with code in this house:
#include <QCoreApplication>
#include <QDebug>
#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;
}
note the commented-out blocks — those are other tests just chilling there, uncommented only when you want them. don't @ me. 🙈
🧚 CONFORMING TO
These functions are as per the withdrawn POSIX.1e draft specification. (yes, withdrawn. we're living in a historical document, iconic behavior honestly. 💅)
The following functions are Linux extensions:
addWatchTargetRecursive()addWatchTargetListRecursive()removeWatchTargetRecursive()clearWatchList()pauseWatcher()
👑 SEE ALSO
addWatchTargetRecursive(3)addWatchTargetListRecursive(3)removeWatchTargetRecursive(3)clearWatchList(3)pauseWatcher(3)
My Project · Wed Sep 20 2023 · restartWatcher(3)
okay that's the whole page bestie, mwah, go restart some watchers, ily, 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