On 24 Aug 2015 at 0:46, Klaim - Joël Lamotte wrote:
Small side question: some time last year there was a discussion about filesystem/directory watcher libraries, with mention about one that would be part (or an example implementation) of boost AFIO. Looking at github, the branches that seem to be related (dir_monitor) are "staled".
Paul was working on that back in 2013/2014. It's his branch.
Am I correct that the directory monitoring "feature" is not part of this library review (I can't find it in the documentation)?
Correct. He never finished it. It's surprisingly hard to do correctly - most implementations out there are broken in subtle ways (mainly in handling change in large directories without racing on the delta calculation, and doing that with a good complexity and without using tons of RAM). I have some watch side code here for forthcoming async byte range locking, but it is not well tested, plus it only monitors single file entries (i.e. the lock file). I don't expect to finish that code until late 2016. In the meantime, simply poll async_enumerate(). It's a very fast call with good race guarantees on Windows at least, and I took care to make sure the afio::directory_entry structure is as tightly packed as possible. Niall -- ned Productions Limited Consulting http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/