I have been playing with the excellent ARC framework for a small legal information project (more on that soon). I am beginning to think that many RDF usage scenarios involve data in files (stored in a file system) combined with a triple store that preferrably should be kept in sync with the files. Inspired by Niklas Lindström’s Oort I wrote a small plugin to do that in ARC.

The plugin extends the ARC2_Store class with a sync_with_folder($path_to_folder) method. Here is the source code for the initial version if you want to play with it. Rename the file to ARC2_FilesystemSynchronizerPlugin.php ansd save in the ARC plugin folder.

By popular request, here is a simple usage example:

[source:php]

 //Include ARC and configuration include_once(‘path/to/arc/ARC2.php’); include_once(‘path/to/arc/config.php’);

$store = ARC2::getComponent(‘FileSystemSynchronizerPlugin’, $config); $store->sync_with_folder("/root/path/to/file/store");

[/source]

Save the above code to a file called sync.php and run from the command line with php sync.php