Table of Contents

Interface IFilesMonitor

Namespace
Azure.Iot.Operations.Connector.Files.FilesMonitor
Assembly
Azure.Iot.Operations.Connector.dll

Defines the interface for watching a directory and/or file for creations, updates, and deletions.

public interface IFilesMonitor

Methods

Start(string, string?)

Start monitoring the provided directory and/or file.

void Start(string directory, string? file = null)

Parameters

directory string

The directory to monitor.

file string

The specific file to monitor. If not provided, all files in this directory will be monitored.

Stop()

Stop monitoring the provided directory and/or file

void Stop()

Events

OnFileChanged

Event that executes every time the monitored directory and/or file has been created, updated, or deleted with information about what kind of change it was and what file it was that changed.

event EventHandler<FileChangedEventArgs>? OnFileChanged

Event Type

EventHandler<FileChangedEventArgs>