<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>James Wynn &#187; SimpleFileWatcher</title>
	<atom:link href="http://jameswynn.com/tag/simplefilewatcher/feed/" rel="self" type="application/rss+xml" />
	<link>http://jameswynn.com</link>
	<description>Technology, Programming, Games, Rants</description>
	<lastBuildDate>Thu, 15 Dec 2011 19:57:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>SimpleFileWatcher: New version</title>
		<link>http://jameswynn.com/2009/09/simplefilewatcher-new-version/</link>
		<comments>http://jameswynn.com/2009/09/simplefilewatcher-new-version/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 03:46:23 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[SimpleFileWatcher]]></category>

		<guid isPermaLink="false">http://jameswynn.com/?p=161</guid>
		<description><![CDATA[Just released a new version of SimpleFileWatcher. Not a lot of new content, but a pretty serious bug was fixed for Win32 and some better error handling. I create some more maintainable build scripts using premake. Also, I moved the OgreDemo off to its own directory to help contain all the files. Download: SimpleFileWatcher 2009.09.14]]></description>
			<content:encoded><![CDATA[<p>Just released a new version of SimpleFileWatcher. Not a lot of new content, but a pretty serious bug was fixed for Win32 and some better error handling. I create some more maintainable build scripts using <a href="http://industriousone.com/premake">premake</a>. Also, I moved the OgreDemo off to its own directory to help contain all the files.</p>
<p>Download: <a href="http://simplefilewatcher.googlecode.com/files/SimpleFileWatcher-2009-09-14.zip">SimpleFileWatcher 2009.09.14</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jameswynn.com/2009/09/simplefilewatcher-new-version/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FileWatcher becomes SimpleFileWatcher</title>
		<link>http://jameswynn.com/2009/05/filewatcher-becomes-simplefilewatcher/</link>
		<comments>http://jameswynn.com/2009/05/filewatcher-becomes-simplefilewatcher/#comments</comments>
		<pubDate>Fri, 15 May 2009 04:30:54 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[FileWatcher]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[SimpleFileWatcher]]></category>

		<guid isPermaLink="false">http://jameswynn.com/?p=148</guid>
		<description><![CDATA[I finally got around to doing a little more work on FileWatcher and decided it needed an official home.  Then comes the compoundingly obvious problem of giving a product such a generic title.  Sure FileWatcher fits the purpose, but there are about 1.5 billion other projects/products with the same title.  So the new title is [...]]]></description>
			<content:encoded><![CDATA[<p>I finally got around to doing a little more work on FileWatcher and decided it needed an official home.  Then comes the compoundingly obvious problem of giving a product such a generic title.  Sure FileWatcher fits the purpose, but there are about 1.5 billion other projects/products with the same title.  So the new title is SimpleFileWatcher, and with that comes two new features for users of SimpleFileWatcher.  SFW is now under the <a href="http://www.opensource.org/licenses/mit-license.php">MIT License</a>, so no worries about using the code in commercial products.  And secondly, it is hosted on <a href="http://code.google.com">Google Code</a>.</p>
<p><a title="SimpleFileWatcher @ Google Code" href="http://simplefilewatcher.googlecode.com">SimpleFileWatcher</a></p>
<p>And the new release:</p>
<p><a href="http://simplefilewatcher.googlecode.com/files/SimpleFileWatcher-2009-05-14.zip">SimpleFileWatcher v.2009.05.14</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jameswynn.com/2009/05/filewatcher-becomes-simplefilewatcher/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>FileWatcher now supports OSX/BSD via kqueue</title>
		<link>http://jameswynn.com/2009/03/filewatcher-now-supports-osxbsd-via-kqueue/</link>
		<comments>http://jameswynn.com/2009/03/filewatcher-now-supports-osxbsd-via-kqueue/#comments</comments>
		<pubDate>Wed, 04 Mar 2009 23:46:10 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[FileWatcher]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[SimpleFileWatcher]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://jameswynn.com/?p=139</guid>
		<description><![CDATA[Now not only does FileWatcher support Win32 and Linux, but it supports OSX/BSD/anything else using kqueue. This should cover 90% of the cases where this functionality is needed and I'm planning on a fallback mode that will just use directory scans and file timestamps to determine changes. Get the new version here: FileWatcher 2009.03.04]]></description>
			<content:encoded><![CDATA[<p>Now not only does FileWatcher support Win32 and Linux, but it supports OSX/BSD/anything else using kqueue.  This should cover 90% of the cases where this functionality is needed and I'm planning on a fallback mode that will just use directory scans and file timestamps to determine changes.</p>
<p>Get the new version here:<br />
<a href="http://jameswynn.com/files/FileWatcher-2009.03.04.zip">FileWatcher 2009.03.04</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jameswynn.com/2009/03/filewatcher-now-supports-osxbsd-via-kqueue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FileWatcher library watches files while you play</title>
		<link>http://jameswynn.com/2009/02/filewatcher-library-watches-files-while-you-play/</link>
		<comments>http://jameswynn.com/2009/02/filewatcher-library-watches-files-while-you-play/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 13:14:31 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[FileWatcher]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[SimpleFileWatcher]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://jameswynn.com/?p=118</guid>
		<description><![CDATA[Spurred by an article a while back in Game Developer Magazine, I decided to write a little cross platform library for detecting changes in files. The library works in both Windows and Linux (tested in ubuntu 8.10, but should work in anything with inotify) with support soon coming to OSX. The library is great for [...]]]></description>
			<content:encoded><![CDATA[<p>Spurred by an article a while back in Game Developer Magazine, I decided to write a little cross platform library for detecting changes in files.  The library works in both Windows and Linux (tested in ubuntu 8.10, but should work in anything with inotify) with support soon coming to OSX.  The library is great for automatically updating game resources during development.  Most real game engines have this these days, and now everyone else can too!</p>
<p>The library comes with two samples.  OgreDemo.cpp shows a simple example of reloading textures on the fly using the <a href="http://www.ogre3d.org">Ogre3D</a> engine.  SimpleDemo.cpp just watches a directory and outputs the file names when a file changes.</p>
<p>Some example code:</p>

<div class="wp_syntax"><div class="code"><pre class="cpp" style="font-family:monospace;"><span style="color: #666666;">// Create the object</span>
FW<span style="color: #008080;">::</span><span style="color: #007788;">FileWatcher</span><span style="color: #000040;">*</span> fileWatcher <span style="color: #000080;">=</span> <span style="color: #0000dd;">new</span> FW<span style="color: #008080;">::</span><span style="color: #007788;">FileWatcher</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
&nbsp;
<span style="color: #666666;">// add a directory watch</span>
FW<span style="color: #008080;">::</span><span style="color: #007788;">WatchID</span> watchid <span style="color: #000080;">=</span> fileWatcher<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>addWatch<span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;..<span style="color: #000099; font-weight: bold;">\\</span>media&quot;</span>, <span style="color: #0000dd;">new</span> UpdateListener<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
&nbsp;
...
&nbsp;
<span style="color: #666666;">// somewhere in your update loop call update</span>
fileWatcher<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>update<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
&nbsp;
<span style="color: #666666;">// where UpdateListener is defined as such</span>
<span style="color: #0000ff;">class</span> UpdateListener <span style="color: #008080;">:</span> <span style="color: #0000ff;">public</span> FW<span style="color: #008080;">::</span><span style="color: #007788;">FileWatchListener</span>
<span style="color: #008000;">&#123;</span>
<span style="color: #0000ff;">public</span><span style="color: #008080;">:</span>
    UpdateListener<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span><span style="color: #008000;">&#125;</span>
    <span style="color: #0000ff;">void</span> handleFileAction<span style="color: #008000;">&#40;</span>FW<span style="color: #008080;">::</span><span style="color: #007788;">WatchID</span> watchid, <span style="color: #0000ff;">const</span> String<span style="color: #000040;">&amp;</span> dir,
                                    <span style="color: #0000ff;">const</span> String<span style="color: #000040;">&amp;</span> filename,
                                    FW<span style="color: #008080;">::</span><span style="color: #007788;">FileWatcher</span><span style="color: #008080;">::</span><span style="color: #007788;">Action</span> action<span style="color: #008000;">&#41;</span>
    <span style="color: #008000;">&#123;</span>
        std<span style="color: #008080;">::</span><span style="color: #0000dd;">cout</span> <span style="color: #000080;">&lt;&lt;</span> <span style="color: #FF0000;">&quot;File (&quot;</span> <span style="color: #000080;">&lt;&lt;</span> dir <span style="color: #000040;">+</span> \\ <span style="color: #000040;">+</span> filename <span style="color: #000080;">&lt;&lt;</span> <span style="color: #FF0000;">&quot;) has event &quot;</span>
                        <span style="color: #000080;">&lt;&lt;</span> action <span style="color: #000080;">&lt;&lt;</span> std<span style="color: #008080;">::</span><span style="color: #007788;">endl</span><span style="color: #008080;">;</span>
    <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span><span style="color: #008080;">;</span></pre></div></div>

<p><a href="http://jameswynn.com/files/FileWatcher-2009.02.17.zip">Download version 2009.02.17</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jameswynn.com/2009/02/filewatcher-library-watches-files-while-you-play/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

