Monitoring a directory

Good afternoon,

is there a way to monitoring filesystem events with SDL?
I want to watch a directory when a file was changed/moved/deleted/copied.

On Linux there is “inotify” but what should I use for windows?

Thanks for advice.
Mik

I think libevent[1] is a fairly popular cross-platform library for this sort of thing. This sort of functionality might be outside of the scope of SDL since it has to run on platforms where this is not a concern.

[1] https://libevent.org/

1 Like

You can use this, but it must be polled (see the section on asynchronous use): ReadDirectoryChangesW function (winbase.h) - Win32 apps | Microsoft Learn

2 Likes