C# Class GSF.IO.FileProcessor

Tracks files processed in a list of directories, and notifies when new files become available to be processed.
Inheritance: IDisposable
Mostrar archivo Open project: GridProtectionAlliance/gsf Class Usage Examples

Public Properties

Property Type Description
DefaultCachePath string

Public Methods

Method Description
AddTrackedDirectory ( string path ) : void

Adds a directory to the list of directories tracked by this FileProcessor.

ClearTrackedDirectories ( ) : void

Empties the list of directories tracked by this FileProcessor.

Dispose ( ) : void

Releases all the resources used by the FileProcessor object.

EnumerateWatchDirectories ( ) : void

Forces enumeration of directories currently being watched.

FileProcessor ( System.Guid processorID ) : System

Creates a new instance of the FileProcessor class.

RemoveTrackedDirectory ( string path ) : void

Removes a directory from the list of directories tracked by this FileProcessor.

StopEnumeration ( ) : void

Stops all enumeration operations that are currently running.

Private Methods

Method Description
DelayAndExecute ( System.Action action, int delay ) : void
FileWatchTimer_Elapsed ( object sender, System.Timers.ElapsedEventArgs elapsedEventArgs ) : void
LoadProcessedFiles ( ) : void
MatchesFilter ( string filePath ) : bool
OnError ( Exception ex ) : void
OnProcessing ( string fullPath, bool alreadyProcessed ) : bool
ProcessFile ( string filePath ) : bool
QueueFileForProcessing ( string filePath ) : void
RemoveFileWatcher ( SafeFileWatcher watcher ) : void
StartProcessLoop ( string filePath ) : void
TouchLockAndProcess ( string filePath ) : void
Watcher_Changed ( object sender, FileSystemEventArgs args ) : void
Watcher_Created ( object sender, FileSystemEventArgs args ) : void
Watcher_Deleted ( object sender, FileSystemEventArgs args ) : void
Watcher_Error ( object sender, ErrorEventArgs args ) : void
Watcher_Renamed ( object sender, RenamedEventArgs args ) : void

Method Details

AddTrackedDirectory() public method

Adds a directory to the list of directories tracked by this FileProcessor.
public AddTrackedDirectory ( string path ) : void
path string The path to the directory to be tracked.
return void

ClearTrackedDirectories() public method

Empties the list of directories tracked by this FileProcessor.
public ClearTrackedDirectories ( ) : void
return void

Dispose() public method

Releases all the resources used by the FileProcessor object.
public Dispose ( ) : void
return void

EnumerateWatchDirectories() public method

Forces enumeration of directories currently being watched.
public EnumerateWatchDirectories ( ) : void
return void

FileProcessor() public method

Creates a new instance of the FileProcessor class.
public FileProcessor ( System.Guid processorID ) : System
processorID System.Guid Identifies the file processor so that it can locate its processed file cache.
return System

RemoveTrackedDirectory() public method

Removes a directory from the list of directories tracked by this FileProcessor.
public RemoveTrackedDirectory ( string path ) : void
path string The path to the directory to stop tracking.
return void

StopEnumeration() public method

Stops all enumeration operations that are currently running.
public StopEnumeration ( ) : void
return void

Property Details

DefaultCachePath public_oe static_oe property

Default value for the CachePath property.
public static string DefaultCachePath
return string