C# Class mybox.DirectoryWatcher

Class for watching a directory for updates
Show file Open project: jonocodes/mybox Class Usage Examples

Public Methods

Method Description
DirectoryWatcher ( String _dir, ClientServerConnection _client ) : System
Listen ( ) : void

Enable the event raiser for the update listener

Pause ( ) : void

Disable the event raiser for the update listener

Private Methods

Method Description
onChanged ( object source, FileSystemEventArgs e ) : void

Handler for directory or file change update

onRenamed ( object source, RenamedEventArgs e ) : void
run ( ) : void

Dummy loop for the listener thread

start ( ) : void

Method Details

DirectoryWatcher() public method

public DirectoryWatcher ( String _dir, ClientServerConnection _client ) : System
_dir String
_client ClientServerConnection
return System

Listen() public method

Enable the event raiser for the update listener
public Listen ( ) : void
return void

Pause() public method

Disable the event raiser for the update listener
public Pause ( ) : void
return void