Extension:FileSync

Overview
This extension allows wiki sysops to set up relationships between wiki articles and files in the local file-system so that when the article is modified the file's content is also updated. Also if the file in the file-system is modified, then when the article is next viewed, it's content will be updated and the revision added to the history as if it were edited in the wiki. Whenever the article is updated from the file, or if the file doesn't exist, the user viewing the article is notified with a warning message. If the article is deleted, then the corresponding file in the file-system is also deleted, and if a synchronised file doesn't exist when its article is saved the wiki will attempt to create it.

Installation
Copy the extension code from Organic Design, save into your extensions directory and include into your LocalSettings.php file as usual.

The extension displays message in the SiteNotice region of the page to notify the user if the file or article have been updated, and also a general reminder that the article is associated to a file. These messages currently use a template which requires icon and text parameters, the one we use is OrganicDesign:Template:Message.

Usage
Files in the file-system will only undergo changed at the time the associated article is saved or deleted, and only if the user is in the sysop group. To associate an article with a file, simply add the #filesync parser function syntax to any article which requires synchronisation with a file in the local file-system as follows:

Bugs and Todo

 * Allow multiple file paths to be synchronised
 * Allow other protocols using PHP's fopen wrappers
 * Notification of file having been updated doesn't work yet