rdunnington / rjd

Minimal C11 game libraries
The Unlicense
52 stars 0 forks source link

new API: rjd_filewatcher #5

Open rdunnington opened 4 years ago

rdunnington commented 4 years ago

A platform-independent file watching library. Ideally you pass it a directory to watch, then periodically poll it to see what's changed. Maybe something like

rjd_result rjd_filewatcher_start(struct rjd_filewatcher* watcher, const char* path, struct rjd_filewatcher_options);
void rjd_filewatcher_stop(struct rjd_filewatcher* watcher);
rjd_result rjd_filewatcher_poll(struct rjd_filewatcher* watcher, struct rjd_filewatcher_changes* changes);
rdunnington commented 4 years ago

This would make an ideal "plugin" for the rjd_resource system.