restartWatcher(3)

📦 version 3.0.1.4, in arch rolling, ubuntu resolute, ubuntu stonking

💖 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


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