//
// 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