I need a Delphi 2005 object/component that will let me specify a folder to watch, and notify me when a file in this folder is changed in size or updated.
There can be no polling involved, only WaitForSingleObject or similar techniques using Windows API.
The interface should look like this:
type
TEventType = ( feFileSize, feLastUpdate );
TChangeEvent = procedure( Sender: TObject; const AFilename: string; const AEventType: TEventType ) of object;
TDirWatch = class( TObject )
public
procedure StartWatch( const ADirectory: string );
procedure StopWatch;
property OnChange: TChangeEvent;
end;
## Deliverables
1) Complete and fully-functional component in source code.
2) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).
## Platform
Windows 32, Delphi source.