You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Robin Rodricks edited this page Dec 8, 2024
·
9 revisions
Architecture
Overview
FluentFTP includes high-level classes that will monitor any number of folders on an FTP(S) server and generate events when files are added, edited or deleted.
You can use this to implement FTP monitoring functionality on any client program or cloud service.
API
Classes
Create an instance of any one of these classes to monitor an FTP server.
new FtpMonitor() - regular synchronous monitor
new AsyncFtpClient() - regular async monitor
new BlockingAsyncFtpMonitor() - unusual async pattern monitor (documented here)
Configuration
The FTP monitor classes have these settings:
monitor.ChangeDetected - Event handler or callback that will be triggered when any files have changed.
monitor.PollInterval - Gets or sets the polling interval. Default: 10 minutes.
monitor.Recursive - Gets or sets whether to recursively monitor subfolders. Default: false.
monitor.WaitForUpload - Whether to wait for list items to be fully uploaded (having a stable file size) before reporting them as added. Default: true.
Create any FTP monitor class, and provide it your FTP client instance, which it will exclusively use to connect to your FTP server.
You must then provide a set of FTP folder paths that it should monitor (in the constructor).
It will periodically check the FTP folder (by getting a listing of files) and then compare the previous listing with the current listing, to see which files have been changed.
If any files have changed, it will trigger the ChangeDetected event/callback with the details passed to your application in a FtpMonitorEventArgs object