Boost logo

Boost :

Subject: Re: [boost] [filesystem] file monitoring
From: cg (chengang31_at_[hidden])
Date: 2008-10-23 21:17:13


Carlos Rafael Giani wrote:
> Hi,
>
> is a file monitor feature planned for boost.filesystem? I have been
> looking for a platform independent solution, but there is none (except
> in toolkits like Qt). Also, so far only inotify (a subsystem in the
> Linux kernel) can tell me when a file is closed after writing, which is
> absolutely necessary when watching a plugins/ directory, for example
> (you don't want to touch the plugins when they're only halfway copied).
> Several tools watch the plugin directory, but don't care if the plugins
> are being written or are fully there already. This can lead to
> instabilities.
>

Yea, a file monitor is very useful. I am using the file monitor from
Adobe ASL[1], in my case, I use it to monitor the GLSL shader files,
so I can change and load them dynamically.

[1] http://stlab.adobe.com/classadobe_1_1file__monitor__t.html

> I think it is only logical to add this to boost.filesystem, something
> like set_monitor_callback(pathname, function_object);
>

Agree, although a file monitor may need other things, like thread,
timer, function (or signals) to implement, Boost.Filesystem indeed
looks like the best place to add it, because is a *file* monitor.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk