$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] file monitoring
From: Colin Powers (Colin.Powers_at_[hidden])
Date: 2013-04-05 11:21:20
I'm looking for a way to get notified as soon as a new file has been
created. So I was wondering if boost has a way of monitoring files so
I can send them off as soon as I receive them. This would have to work
for Linux and windows. I saw a few posts which seem to indicate that
its not there yet, but that was some time ago.
Thanks,
===========
Last I checked there is nothing provided by Boost (although there were murmurs of it being possible to add into Boost ASIO). However, there are OS-specific interfaces you can use for this, you would just need to provide different implementations depending on the platform.
Have a google around for inotify (for Linux) and ReadDirectoryChangesW (for Windows). You should be able to find plenty of examples of their usage :)
-Colin