townengine/src/twn_filewatch_c.h

22 lines
506 B
C
Raw Normal View History

#ifndef TWN_FILEWATCH_C_H
#define TWN_FILEWATCH_C_H
#include <stdbool.h>
enum FilewatchAction {
FILEWATCH_ACTION_FILE_NONE,
FILEWATCH_ACTION_FILE_CREATED,
FILEWATCH_ACTION_FILE_DELETED,
FILEWATCH_ACTION_FILE_MODIFIED,
};
2025-02-01 11:25:54 +00:00
typedef void (*FilewatchCallback)(char const *path, enum FilewatchAction action);
2025-02-01 11:25:54 +00:00
bool filewatch_add_directory(char const *dir, FilewatchCallback callback);
2025-02-01 11:25:54 +00:00
bool filewatch_add_file(char const *file, FilewatchCallback callback);
void filewatch_poll(void);
#endif