Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Portable Directory/File watch library in C / C++

Tags:

c++

c

filesystems

Is there a portable library to watch for filesystem changes without polling?

I know there is

  • inotify for Linux
  • solution for osx
  • FindFirstChangeNotificationfor Windows
  • NIO.2 for Java
  • System.IO.FileSystemWatcher for .NET

but i have not found any portable wrapper for those.

Is there a portable wrapper for Linux, Windows and OS X or a subset of those?

like image 208
flob Avatar asked Sep 08 '11 09:09

flob


2 Answers

QFileSystemWatcher -- Qt is very cross-platform.

like image 55
spraff Avatar answered Nov 09 '22 15:11

spraff


Have a look at jnotify. It's written in java and can run on all the major OSes.

like image 1
slm Avatar answered Nov 09 '22 14:11

slm