CyclicalFileWatcher 0.17.0

dotnet add package CyclicalFileWatcher --version 0.17.0
                    
NuGet\Install-Package CyclicalFileWatcher -Version 0.17.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CyclicalFileWatcher" Version="0.17.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CyclicalFileWatcher" Version="0.17.0" />
                    
Directory.Packages.props
<PackageReference Include="CyclicalFileWatcher" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CyclicalFileWatcher --version 0.17.0
                    
#r "nuget: CyclicalFileWatcher, 0.17.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CyclicalFileWatcher@0.17.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CyclicalFileWatcher&version=0.17.0
                    
Install as a Cake Addin
#tool nuget:?package=CyclicalFileWatcher&version=0.17.0
                    
Install as a Cake Tool

<div align="center">

CyclicalFileWatcher <br> 😼

A library for cyclical asynchronous file watching with subscription support.

Latest release Coveralls NuGet Version

</div>

Why CyclicalFileWatcher

Unlike another file watching solutions that rely on OS-level tools or native file system event hooks, CyclicalFileWatcher uses a simple polling mechanism to detect changes.

This approach:

  • Works consistently across platforms and environments (e.g. Docker, network drives, cloud volumes).
  • Requires no external dependencies, system utilities, or file system support.
  • Gives you full control over polling intervals and error handling.

It’s ideal for scenarios where reliability and isolation from the underlying OS are more important than real-time change detection.

Usage

var fileWatcher = new CyclicalFileWatcher<FileObject>(configuration);

await fileWatcher.WatchAsync(parameters, cancellationToken);

await fileWatcher.SubscribeAsync(filePath, async _ =>
{
    Console.WriteLine("Subscription action executed");
}, cancellationToken);

var latestFile = await fileWatcher.GetLatestAsync(filePath, cancellationToken);

See the full example in src/CyclicalFileWatcher.Test/Program.cs

License

Released under MIT by @EvgenyHalzov.

  • You can freely modify and reuse.
  • The original license must be included with copies of this software.
  • Please link back to this repo if you use a significant portion the source code.
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.17.0 378 6/10/2025
0.16.0 247 6/8/2025
0.15.0 272 6/8/2025
0.14.0 256 6/8/2025
0.13.0 200 5/19/2025
0.12.0 188 5/19/2025
0.11.0 194 5/18/2025
0.10.0 188 5/18/2025
0.9.0 201 5/18/2025
0.8.0 210 5/6/2025
0.7.0 147 4/27/2025
0.6.0 165 4/26/2025
0.5.0 159 4/25/2025
0.4.0 217 4/21/2025
0.3.0 586 3/26/2025
0.2.0 526 3/26/2025
0.1.0 524 3/26/2025