FileFlower.DependencyInjection
0.0.1-alpha.3
See the version list below for details.
dotnet add package FileFlower.DependencyInjection --version 0.0.1-alpha.3
NuGet\Install-Package FileFlower.DependencyInjection -Version 0.0.1-alpha.3
<PackageReference Include="FileFlower.DependencyInjection" Version="0.0.1-alpha.3" />
<PackageVersion Include="FileFlower.DependencyInjection" Version="0.0.1-alpha.3" />
<PackageReference Include="FileFlower.DependencyInjection" />
paket add FileFlower.DependencyInjection --version 0.0.1-alpha.3
#r "nuget: FileFlower.DependencyInjection, 0.0.1-alpha.3"
#:package FileFlower.DependencyInjection@0.0.1-alpha.3
#addin nuget:?package=FileFlower.DependencyInjection&version=0.0.1-alpha.3&prerelease
#tool nuget:?package=FileFlower.DependencyInjection&version=0.0.1-alpha.3&prerelease
FileFlower
Overview
This package provides an ability to register file watcher in the DI container and host it as a HostedService. It works on top of the FileFlower.Core package, which is a lightweight, flexible .NET library that enables event-driven, pipeline-based processing of file system changes. Designed for building modular workflows around directory watching, FileFlower lets you:
- React to file creation, modification, deletion events
- Filter and route files by patterns and extensions
- Define processing pipelines with pre- and post-steps
- Easily chain multiple processors in a clean, reusable way
FileFlower is ideal for building file ingestion services, automated workflows, and data pipelines that work with file systems in a reactive and maintainable manner.
Features
- Monitor directories and subdirectories for file changes
- Filter files by pattern, extension, or custom rules
- Define composable pipeline steps for processing files
- Support for error handling, retries, and archiving
- Minimal dependencies, cross-platform (.NET 8+)
Getting Started
builder.Services.AddFileWatcher(@"./incoming/", watcher =>
{
watcher.WhenResourceCreated(rule => rule.Filter("*.txt").Filter("*.csv").WithOrLogic())
.AddStep(file =>
{
Console.WriteLine($"CLIENT | Processed txt or csv: {file.FullName}");
return Task.CompletedTask;
});
watcher.WhenResourceCreated(rule => rule.Filter("*test*").Filter("*.bat"))
.AddStep(file =>
{
Console.WriteLine($"CLIENT | Processed bat which contains word 'test': {file.FullName}");
return Task.CompletedTask;
});
watcher.WhenResourceCreated(rule => rule.Filter("*.log"))
.AddStep(file =>
{
Console.WriteLine($"CLIENT | Processed log: {file.FullName}");
return Task.CompletedTask;
});
}).AddFileWatcherHostedService();
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. 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. |
-
net9.0
- FileFlower.Core (>= 0.0.1-alpha.3)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.6)
- Microsoft.Extensions.Hosting.Abstractions (>= 9.0.6)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.6)
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 |
---|---|---|
1.0.1 | 141 | 6/25/2025 |
0.0.1-rc.1 | 120 | 6/24/2025 |
0.0.1-alpha.6 | 71 | 6/20/2025 |
0.0.1-alpha.5 | 71 | 6/20/2025 |
0.0.1-alpha.4 | 75 | 6/20/2025 |
0.0.1-alpha.3 | 74 | 6/20/2025 |
0.0.1-alpha.2 | 78 | 6/20/2025 |
0.0.1-alpha.1 | 73 | 6/20/2025 |