Skip to content

Instantly share code, notes, and snippets.

@emoon
Last active August 29, 2015 14:14
Show Gist options
  • Save emoon/a01220de807b90c505c9 to your computer and use it in GitHub Desktop.
Save emoon/a01220de807b90c505c9 to your computer and use it in GitHub Desktop.
// files = list of files that has changed
// fileCount = number of files
// The code is not allowed to save any of the filenames directly but must take a copy if that is needed (so the calling code can free the memory)
typedef void (*NotificationCallback)(void* userData, const char** files, int fileCount);
typedef void* DWHandle;
// path = path to watch
// fileFilters = in style with "*.txt;*.dll;*.so"
// callback = will get called when something has changed
// userData = will be sent to the callback function when an event happens
DWHandle DirectoryWatcher_add(const char* path, const char* fileFilers, NotificationCallback callback, void* userData);
// Remove a directory for watching
void DirectoryWatcher_remove(DWHandle handle);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment