#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,
};

typedef void (*FilewatchCallback)(char const *path, enum FilewatchAction action);

bool filewatch_add_directory(char const *dir, FilewatchCallback callback);

bool filewatch_add_file(char const *file, FilewatchCallback callback);

void filewatch_poll(void);

#endif
