AL-FileSystemWatcher
1.0.0
dotnet add package AL-FileSystemWatcher --version 1.0.0
NuGet\Install-Package AL-FileSystemWatcher -Version 1.0.0
<PackageReference Include="AL-FileSystemWatcher" Version="1.0.0" />
<PackageVersion Include="AL-FileSystemWatcher" Version="1.0.0" />
<PackageReference Include="AL-FileSystemWatcher" />
paket add AL-FileSystemWatcher --version 1.0.0
#r "nuget: AL-FileSystemWatcher, 1.0.0"
#:package AL-FileSystemWatcher@1.0.0
#addin nuget:?package=AL-FileSystemWatcher&version=1.0.0
#tool nuget:?package=AL-FileSystemWatcher&version=1.0.0
FileSystemWatcher

FileSystemWatcher is a C# library whose purpose is to detect directory changes and return all renamed, moved, created, and deleted files. It is able to spot renamed files without requiring the use of hashcode comparisons or real time tracking. It targets netstandard2.1+.
Examples
Use it like the following example :
namespace FileSystemWatcher
{
class Program
{
static void Main(string[] args)
{
// Choose a directory to watch
string directory = @"/Users/nginx-iwnl/Desktop/Project";
// Initialize directory
FileSystemWatcher.BeginInit(directory);
// Optional: using ignore patterns
string[] ignore = { ".exe", "/node_modules" };
FileSystemWatcher.BeginInit(directory, ignore);
}
}
}
- Apply changes to your directory ..... (rename, delete...)
- Get results by calling
EndInit
using System;
namespace FileSystemWatcher
{
class Program
{
static void Main(string[] args)
{
// Choose a directory to watch
string directory = @"/Users/nginx-iwnl/Desktop/Project";
// End directory watch
ChangeModel result = FileSystemWatcher.EndInit(directory);
// Print Result
Console.WriteLine("Directory has changed : {0}", result.HasChanged);
Console.WriteLine("\n----Created Files:");
foreach (var file in result.Changes.created)
Console.WriteLine(file);
Console.WriteLine("\n----Deleted Files:");
foreach (var file in result.Changes.deleted)
Console.WriteLine(file);
Console.WriteLine("\n----Renamed Files:");
foreach (var file in result.Changes.renamed)
Console.WriteLine("{0} => {1}", file.prevName, file.name);
Console.WriteLine("\n----Changed Files:");
foreach (var file in result.Changes.changed)
Console.WriteLine("{0} with {1}% match", file.filename, file.match);
}
}
}
expected result:
provided implementations:
created filesdeleted filesrenamed filesmoved fileschanged files with similarity percentage %
| Product | Versions 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. |
-
.NETStandard 2.1
- No dependencies.
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.0 | 745 | 12/23/2020 |
detect directory change and return renamed, moved, created, and deleted files. Able to spot renamed files without hashcode comparing or real time tracking.