Search code examples
cfilesystemscross-platformwatch

Cross-Platform API to monitor file system in C?


I'm looking for a cross platform library to detect when files in a directory are added or modified.
I know there are OS specific way to do this (inotify for Linux, FindFirstChangeNotification for windows, etc...).

But is there a platform independent library that works specifically in C? (Like the QFileSystemWatcher in C++)


Solution

  • It's now 2021 so maybe septag/dmon is your cup of tea.

    From the description:

    Single header C99 portable library for monitoring directory changes

    ... or maybe the more beefy fswatch ?