libkyfilewatcher(3)

NAME
libkyfilewatcher - 文件管理功能

SYNOPSIS

  Classes
class KYSDK_FILEWATCHER::FileWatcher
文件管理类 主要用来增加需要监听的文件路径，增加需要监听的文件列表，从监听列表中移除指定的文件，清空监听列表，暂停文件监听，恢复文件监听

  Enumerations
enum FileWatcherType { ONESHOT = 0, PERIODIC, NEVER }
enum FileWatcherAttribute { ACCESS = IN_ACCESS, CREATE = IN_CREATE, MODIFY = IN_MODIFY, DELETE = IN_DELETE | IN_DELETE_SELF, ATTRIB = IN_ATTRIB, MOVE = IN_MOVE | IN_MOVE_SELF, OPEN = IN_OPEN, CLOSE = IN_CLOSE, ALL = IN_ALL_EVENTS }
enum RecursiveType { DIR = 1 << 0, REGULAR = 1 << 1, HIDDEN = 1 << 2, TMPFILE = 1 << 3, ALLFILE = HIDDEN | TMPFILE | DIR | REGULAR }

  Functions
QStringList KYSDK_FILEWATCHER::FileWatcher::addWatchTargetRecursive (QString url, FileWatcherType type=PERIODIC, int attr=OPEN|CLOSE|MODIFY|DELETE, int maxdepth=5, int recurType=DIR|REGULAR)
增加需要监听的文件路径，对于目录，默认启用递归监听子目录
QStringList KYSDK_FILEWATCHER::FileWatcher::addWatchTargetListRecursive (QStringList urlList, FileWatcherType type=PERIODIC, int attr=OPEN|CLOSE|MODIFY|DELETE, int maxdepth=5, int recurType=DIR|REGULAR)
增加需要监听的文件列表
QStringList KYSDK_FILEWATCHER::FileWatcher::removeWatchTargetRecursive (QString url, int maxdepth=5, int recurType=ALLFILE)
从监听列表中移除指定的文件
void KYSDK_FILEWATCHER::FileWatcher::clearWatchList ()
清空监听列表
void KYSDK_FILEWATCHER::FileWatcher::pauseWatcher ()
暂停文件监听
void KYSDK_FILEWATCHER::FileWatcher::restartWatcher ()
恢复文件监听

Detailed Description
此库的主要功能是提供文件管理接口和类

Function Documentation

  QStringList KYSDK_FILEWATCHER::FileWatcher::addWatchTargetListRecursive (QStringList urlList, FileWatcherType type = PERIODIC, int attr = OPEN|CLOSE|MODIFY|DELETE, int maxdepth = 5, int recurType = DIR|REGULAR)

增加需要监听的文件列表

Parameters
    urlList 需要监听的文件列表
    type 文件监听类型
    attr 文件监听属性
    maxdepth 指定遍历搜索的最大深度
    recurType 递归类型

  QStringList KYSDK_FILEWATCHER::FileWatcher::addWatchTargetRecursive (QString url, FileWatcherType type = PERIODIC, int attr = OPEN|CLOSE|MODIFY|DELETE, int maxdepth = 5, int recurType = DIR|REGULAR)

增加需要监听的文件路径，对于目录，默认启用递归监听子目录

Parameters
    url 文件路径
    type 文件监听类型
    attr 文件监听属性
    maxdepth 指定遍历搜索的最大深度
    recurType 递归类型

Examples
kysdk-system/src/filesystem/filewatcher/test/kyfilewatcher-test.cpp.

  QStringList KYSDK_FILEWATCHER::FileWatcher::removeWatchTargetRecursive (QString url, int maxdepth = 5, int recurType = ALLFILE)

从监听列表中移除指定的文件

Parameters
    url 指定的文件的路径
    maxdepth 指定遍历搜索的最大深度
    recurType 递归类型

Author

Generated automatically by Doxygen for libkyfilewatcher.hpp from the source code.