File: programming/cocoa/

/* =============================================================================
	FILE:		UKFileWatcher.h
    COPYRIGHT:  (c) 2005 M. Uli Kusterer, all rights reserved.
	AUTHORS:	M. Uli Kusterer - UK
    LICENSES:   MIT License
		2006-03-13	UK	Moved notification constants to .m file.
		2005-02-25	UK	Created.
   ========================================================================== */
    This is a protocol that file change notification classes should adopt.
    That way, no matter whether you use Carbon's FNNotify/FNSubscribe, BSD's
    kqueue or whatever, the object being notified can react to change
    notifications the same way, and you can easily swap one out for the other
    to cater to different OS versions, target volumes etc.
// -----------------------------------------------------------------------------
//  Protocol:
// -----------------------------------------------------------------------------
// +(id) sharedFileWatcher;			// Singleton accessor. Not officially part of the protocol, but use this name if you provide a singleton.
// -----------------------------------------------------------------------------
//  Methods delegates need to provide:
// -----------------------------------------------------------------------------
// Notifications this sends:
/*  object			= the file watcher object
	userInfo.path	= file path watched
	These notifications are sent via the NSWorkspace notification center */

This code uses the PclZip Zip File reading code, which is subject to the GNU LGPL. It also uses the GeSHi syntax highlighter, subject to the GPL. Ask if you want this for your own web site, it's free.