vcpe/srcs/libs/include/fs_watch.h

25 lines
630 B
C
Raw Permalink Normal View History

//
// Created by xajhuang on 2023/2/9.
//
#ifndef VCPE_FS_WATCH_H
#define VCPE_FS_WATCH_H
#ifdef __cplusplus
extern "C" {
#endif
/**
*
* @param pPath
* @param filename
* @param events @see uv_fs_event {UV_RENAME = 1, UV_CHANGE = 2}
* @param pWatch
*/
typedef void (*watch_cb)(const char *pPath, const char *filename, int events, const char *pWatch);
int add_watch_path(const char *pFsPath, watch_cb cb);
int remove_watch_path(const char *pFsPath);
#ifdef __cplusplus
}
#endif
#endif //VCPE_FS_WATCH_H