restartWatcher(3)

NAME
restartWatcher - 恢复文件监听

SYNOPSIS
#include <libkyfilewatcher.hpp>

  Classes
class KYSDK_FILEWATCHER::FileWatcher

  Functions
void restartWatcher();

Link with -lkyfilewatcher.

Detailed Description
The main function of the interface is to recover file listening.

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(), clearWatchList() and pauseWatcher().

SEE ALSO
addWatchTargetRecursive(3), addWatchTargetListRecursive(3), removeWatchTargetRecursive(3), clearWatchList(3) and pauseWatcher(3).