Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>There are several ways to do this depending on the platform. I would choose from the following choices:</p> <h2>Cross Platform</h2> <p>Trolltech's Qt has an object called <a href="http://doc.qt.io/qt-5/qfilesystemwatcher.html" rel="nofollow noreferrer">QFileSystemWatcher</a> which allows you to monitor files and directories. I'm sure there are other cross platform frameworks that give you this sort of capability too, but this one works fairly well in my experience.</p> <h2>Windows (Win32)</h2> <p>There is a Win32 api called <a href="http://msdn.microsoft.com/en-us/library/aa364417%28VS.85%29.aspx" rel="nofollow noreferrer">FindFirstChangeNotification</a> which does the job. There is a nice article which a small wrapper class for the api called <a href="http://www.codeproject.com/KB/files/DirCheck.aspx" rel="nofollow noreferrer">How to get a notification if change occurs in a specified directory</a> which will get you started.</p> <h2>Windows (.NET Framework)</h2> <p>If you are ok using C++/CLI with the .NET Framework then <a href="http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher%28VS.80%29.aspx#Mtps_DropDownFilterText" rel="nofollow noreferrer">System.IO.FileSystemWatcher</a> is your class of choice. Microsoft has a nice article on <a href="http://msdn.microsoft.com/en-us/library/chzww271.aspx" rel="nofollow noreferrer">how to monitor file system changes</a> using this class.</p> <h2>OS X</h2> <p>The <a href="http://developer.apple.com/documentation/Darwin/Conceptual/FSEvents_ProgGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40005289-CH1-DontLinkElementID_15" rel="nofollow noreferrer">FSEvents</a> API is new for OS X 10.5 and very full-featured.</p> <h2>Linux</h2> <p>Use <a href="http://en.wikipedia.org/wiki/Inotify" rel="nofollow noreferrer">inotify</a> as Alex mentioned in his answer.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload