clearWatchList(3)

clearWatchList3

清空监听列表

Usage

#include <libkyfilewatcher.hpp>

Classes

class KYSDK_FILEWATCHER::FileWatcher

Functions

void clearWatchList();

Link with -lkyfilewatcher.

Detailed Description

The main function of the interface is to clear listening list.

Return value

No return value

Examples

#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;
}

Conforming to

These functions are as per the withdrawn POSIX.1e draft specification. The following functions are Linux extensions: addWatchTargetRecursive(), addWatchTargetListRecursive(), removeWatchTargetRecursive(), pauseWatcher() and restartWatcher().

From libkysdk-system 3.0.1.4-1 in Arch Linux 2026-11-07. Parsed by carta from the page's man source.