├── images
├── result.png
└── watcher.png
├── FileSystemWatcher
├── obj
│ ├── Debug
│ │ └── netstandard2.1
│ │ │ ├── FileSystemWatcher.AssemblyInfoInputs.cache
│ │ │ ├── FileSystemWatcher.csproj.CoreCompileInputs.cache
│ │ │ ├── FileSystemWatcher.dll
│ │ │ ├── FileSystemWatcher.pdb
│ │ │ ├── FileSystemWatcher.assets.cache
│ │ │ ├── FileSystemWatcher.csprojAssemblyReference.cache
│ │ │ ├── .NETStandard,Version=v2.1.AssemblyAttributes.cs
│ │ │ ├── FileSystemWatcher.csproj.FileListAbsolute.txt
│ │ │ └── FileSystemWatcher.AssemblyInfo.cs
│ ├── Release
│ │ ├── netstandard1.3
│ │ │ ├── FileSystemWatcher.AssemblyInfoInputs.cache
│ │ │ ├── FileSystemWatcher.csproj.CoreCompileInputs.cache
│ │ │ ├── FileSystemWatcher.assets.cache
│ │ │ ├── FileSystemWatcher.csprojAssemblyReference.cache
│ │ │ ├── .NETStandard,Version=v1.3.AssemblyAttributes.cs
│ │ │ ├── FileSystemWatcher.csproj.FileListAbsolute.txt
│ │ │ └── FileSystemWatcher.AssemblyInfo.cs
│ │ └── netstandard2.1
│ │ │ ├── FileSystemWatcher.AssemblyInfoInputs.cache
│ │ │ ├── FileSystemWatcher.csproj.CoreCompileInputs.cache
│ │ │ ├── FileSystemWatcher.dll
│ │ │ ├── FileSystemWatcher.assets.cache
│ │ │ ├── FileSystemWatcher.csprojAssemblyReference.cache
│ │ │ ├── .NETStandard,Version=v2.1.AssemblyAttributes.cs
│ │ │ ├── FileSystemWatcher.csproj.FileListAbsolute.txt
│ │ │ └── FileSystemWatcher.AssemblyInfo.cs
│ ├── project.nuget.cache
│ ├── FileSystemWatcher.csproj.nuget.g.targets
│ ├── FileSystemWatcher.csproj.nuget.g.props
│ ├── FileSystemWatcher.csproj.nuget.dgspec.json
│ └── project.assets.json
├── bin
│ ├── Release
│ │ ├── AL-FileSystemWatcher.1.0.0.nupkg
│ │ └── netstandard2.1
│ │ │ ├── FileSystemWatcher.dll
│ │ │ └── FileSystemWatcher.deps.json
│ └── Debug
│ │ └── netstandard2.1
│ │ ├── FileSystemWatcher.dll
│ │ ├── FileSystemWatcher.pdb
│ │ └── FileSystemWatcher.deps.json
├── FileSystemWatcher.csproj
└── FileSystemWatcher.cs
├── LICENSE
├── FileSystemWatcher.sln
├── .vs
└── FileSystemWatcher
│ └── xs
│ ├── UserPrefs.xml
│ └── project-cache
│ ├── FileSystemWatcher-Debug.json
│ └── FileSystemWatcher-Release.json
└── README.md
/images/result.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AbdelhamidLarachi/FileSystemWatcher/HEAD/images/result.png
--------------------------------------------------------------------------------
/images/watcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AbdelhamidLarachi/FileSystemWatcher/HEAD/images/watcher.png
--------------------------------------------------------------------------------
/FileSystemWatcher/obj/Debug/netstandard2.1/FileSystemWatcher.AssemblyInfoInputs.cache:
--------------------------------------------------------------------------------
1 | 671529715a4a2343f4a1eeed0c4c58f583f16f98
2 |
--------------------------------------------------------------------------------
/FileSystemWatcher/obj/Release/netstandard1.3/FileSystemWatcher.AssemblyInfoInputs.cache:
--------------------------------------------------------------------------------
1 | 52d5002ec493d62a3b36193ca9d8a72d3e168f4f
2 |
--------------------------------------------------------------------------------
/FileSystemWatcher/obj/Release/netstandard2.1/FileSystemWatcher.AssemblyInfoInputs.cache:
--------------------------------------------------------------------------------
1 | 34e2d81530397d944a252bade8441a1a0cb65fe8
2 |
--------------------------------------------------------------------------------
/FileSystemWatcher/obj/Debug/netstandard2.1/FileSystemWatcher.csproj.CoreCompileInputs.cache:
--------------------------------------------------------------------------------
1 | cd0059eeb27ed0c8777a9b87699fe40636e8d046
2 |
--------------------------------------------------------------------------------
/FileSystemWatcher/obj/Release/netstandard1.3/FileSystemWatcher.csproj.CoreCompileInputs.cache:
--------------------------------------------------------------------------------
1 | de84478428aa514a8b0494c99ce9a61470fef057
2 |
--------------------------------------------------------------------------------
/FileSystemWatcher/obj/Release/netstandard2.1/FileSystemWatcher.csproj.CoreCompileInputs.cache:
--------------------------------------------------------------------------------
1 | 1a0e3ac4a6b17b616a8277dae3d9ecc477f80864
2 |
--------------------------------------------------------------------------------
/FileSystemWatcher/bin/Release/AL-FileSystemWatcher.1.0.0.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AbdelhamidLarachi/FileSystemWatcher/HEAD/FileSystemWatcher/bin/Release/AL-FileSystemWatcher.1.0.0.nupkg
--------------------------------------------------------------------------------
/FileSystemWatcher/bin/Debug/netstandard2.1/FileSystemWatcher.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AbdelhamidLarachi/FileSystemWatcher/HEAD/FileSystemWatcher/bin/Debug/netstandard2.1/FileSystemWatcher.dll
--------------------------------------------------------------------------------
/FileSystemWatcher/bin/Debug/netstandard2.1/FileSystemWatcher.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AbdelhamidLarachi/FileSystemWatcher/HEAD/FileSystemWatcher/bin/Debug/netstandard2.1/FileSystemWatcher.pdb
--------------------------------------------------------------------------------
/FileSystemWatcher/bin/Release/netstandard2.1/FileSystemWatcher.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AbdelhamidLarachi/FileSystemWatcher/HEAD/FileSystemWatcher/bin/Release/netstandard2.1/FileSystemWatcher.dll
--------------------------------------------------------------------------------
/FileSystemWatcher/obj/Debug/netstandard2.1/FileSystemWatcher.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AbdelhamidLarachi/FileSystemWatcher/HEAD/FileSystemWatcher/obj/Debug/netstandard2.1/FileSystemWatcher.dll
--------------------------------------------------------------------------------
/FileSystemWatcher/obj/Debug/netstandard2.1/FileSystemWatcher.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AbdelhamidLarachi/FileSystemWatcher/HEAD/FileSystemWatcher/obj/Debug/netstandard2.1/FileSystemWatcher.pdb
--------------------------------------------------------------------------------
/FileSystemWatcher/obj/Release/netstandard2.1/FileSystemWatcher.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AbdelhamidLarachi/FileSystemWatcher/HEAD/FileSystemWatcher/obj/Release/netstandard2.1/FileSystemWatcher.dll
--------------------------------------------------------------------------------
/FileSystemWatcher/obj/Debug/netstandard2.1/FileSystemWatcher.assets.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AbdelhamidLarachi/FileSystemWatcher/HEAD/FileSystemWatcher/obj/Debug/netstandard2.1/FileSystemWatcher.assets.cache
--------------------------------------------------------------------------------
/FileSystemWatcher/obj/Release/netstandard1.3/FileSystemWatcher.assets.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AbdelhamidLarachi/FileSystemWatcher/HEAD/FileSystemWatcher/obj/Release/netstandard1.3/FileSystemWatcher.assets.cache
--------------------------------------------------------------------------------
/FileSystemWatcher/obj/Release/netstandard2.1/FileSystemWatcher.assets.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AbdelhamidLarachi/FileSystemWatcher/HEAD/FileSystemWatcher/obj/Release/netstandard2.1/FileSystemWatcher.assets.cache
--------------------------------------------------------------------------------
/FileSystemWatcher/obj/Debug/netstandard2.1/FileSystemWatcher.csprojAssemblyReference.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AbdelhamidLarachi/FileSystemWatcher/HEAD/FileSystemWatcher/obj/Debug/netstandard2.1/FileSystemWatcher.csprojAssemblyReference.cache
--------------------------------------------------------------------------------
/FileSystemWatcher/obj/Release/netstandard1.3/FileSystemWatcher.csprojAssemblyReference.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AbdelhamidLarachi/FileSystemWatcher/HEAD/FileSystemWatcher/obj/Release/netstandard1.3/FileSystemWatcher.csprojAssemblyReference.cache
--------------------------------------------------------------------------------
/FileSystemWatcher/obj/Release/netstandard2.1/FileSystemWatcher.csprojAssemblyReference.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AbdelhamidLarachi/FileSystemWatcher/HEAD/FileSystemWatcher/obj/Release/netstandard2.1/FileSystemWatcher.csprojAssemblyReference.cache
--------------------------------------------------------------------------------
/FileSystemWatcher/obj/Debug/netstandard2.1/.NETStandard,Version=v2.1.AssemblyAttributes.cs:
--------------------------------------------------------------------------------
1 | //
2 | using System;
3 | using System.Reflection;
4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETStandard,Version=v2.1", FrameworkDisplayName = "")]
5 |
--------------------------------------------------------------------------------
/FileSystemWatcher/obj/Release/netstandard1.3/.NETStandard,Version=v1.3.AssemblyAttributes.cs:
--------------------------------------------------------------------------------
1 | //
2 | using System;
3 | using System.Reflection;
4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETStandard,Version=v1.3", FrameworkDisplayName = "")]
5 |
--------------------------------------------------------------------------------
/FileSystemWatcher/obj/Release/netstandard2.1/.NETStandard,Version=v2.1.AssemblyAttributes.cs:
--------------------------------------------------------------------------------
1 | //
2 | using System;
3 | using System.Reflection;
4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETStandard,Version=v2.1", FrameworkDisplayName = "")]
5 |
--------------------------------------------------------------------------------
/FileSystemWatcher/obj/project.nuget.cache:
--------------------------------------------------------------------------------
1 | {
2 | "version": 2,
3 | "dgSpecHash": "h4ui6fXGhaxKvMLrVntNm6YCUx7OQfcCTk3SY6WwZcPPeRH9nc9sIDNU9HpyZI98VJI+ULshIEasRkO2tVPrcw==",
4 | "success": true,
5 | "projectFilePath": "/Users/nginx-iwnl/Projects/FileSystemWatcher/FileSystemWatcher/FileSystemWatcher.csproj",
6 | "expectedPackageFiles": [
7 | "/Users/nginx-iwnl/.nuget/packages/nuget.build.packaging/0.2.2/nuget.build.packaging.0.2.2.nupkg.sha512"
8 | ],
9 | "logs": []
10 | }
--------------------------------------------------------------------------------
/FileSystemWatcher/obj/Release/netstandard1.3/FileSystemWatcher.csproj.FileListAbsolute.txt:
--------------------------------------------------------------------------------
1 | /Users/nginx-iwnl/Projects/FileSystemWatcher/FileSystemWatcher/obj/Release/netstandard1.3/FileSystemWatcher.csprojAssemblyReference.cache
2 | /Users/nginx-iwnl/Projects/FileSystemWatcher/FileSystemWatcher/obj/Release/netstandard1.3/FileSystemWatcher.AssemblyInfoInputs.cache
3 | /Users/nginx-iwnl/Projects/FileSystemWatcher/FileSystemWatcher/obj/Release/netstandard1.3/FileSystemWatcher.AssemblyInfo.cs
4 | /Users/nginx-iwnl/Projects/FileSystemWatcher/FileSystemWatcher/obj/Release/netstandard1.3/FileSystemWatcher.csproj.CoreCompileInputs.cache
5 |
--------------------------------------------------------------------------------
/FileSystemWatcher/obj/FileSystemWatcher.csproj.nuget.g.targets:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/FileSystemWatcher/obj/Release/netstandard2.1/FileSystemWatcher.csproj.FileListAbsolute.txt:
--------------------------------------------------------------------------------
1 | /Users/nginx-iwnl/Projects/FileSystemWatcher/FileSystemWatcher/bin/Release/netstandard2.1/FileSystemWatcher.deps.json
2 | /Users/nginx-iwnl/Projects/FileSystemWatcher/FileSystemWatcher/bin/Release/netstandard2.1/FileSystemWatcher.dll
3 | /Users/nginx-iwnl/Projects/FileSystemWatcher/FileSystemWatcher/obj/Release/netstandard2.1/FileSystemWatcher.AssemblyInfoInputs.cache
4 | /Users/nginx-iwnl/Projects/FileSystemWatcher/FileSystemWatcher/obj/Release/netstandard2.1/FileSystemWatcher.AssemblyInfo.cs
5 | /Users/nginx-iwnl/Projects/FileSystemWatcher/FileSystemWatcher/obj/Release/netstandard2.1/FileSystemWatcher.csproj.CoreCompileInputs.cache
6 | /Users/nginx-iwnl/Projects/FileSystemWatcher/FileSystemWatcher/obj/Release/netstandard2.1/FileSystemWatcher.dll
7 | /Users/nginx-iwnl/Projects/FileSystemWatcher/FileSystemWatcher/obj/Release/netstandard2.1/FileSystemWatcher.csprojAssemblyReference.cache
8 |
--------------------------------------------------------------------------------
/FileSystemWatcher/bin/Debug/netstandard2.1/FileSystemWatcher.deps.json:
--------------------------------------------------------------------------------
1 | {
2 | "runtimeTarget": {
3 | "name": ".NETStandard,Version=v2.1/",
4 | "signature": ""
5 | },
6 | "compilationOptions": {},
7 | "targets": {
8 | ".NETStandard,Version=v2.1": {},
9 | ".NETStandard,Version=v2.1/": {
10 | "FileSystemWatcher/1.0.0": {
11 | "dependencies": {
12 | "NuGet.Build.Packaging": "0.2.2"
13 | },
14 | "runtime": {
15 | "FileSystemWatcher.dll": {}
16 | }
17 | },
18 | "NuGet.Build.Packaging/0.2.2": {}
19 | }
20 | },
21 | "libraries": {
22 | "FileSystemWatcher/1.0.0": {
23 | "type": "project",
24 | "serviceable": false,
25 | "sha512": ""
26 | },
27 | "NuGet.Build.Packaging/0.2.2": {
28 | "type": "package",
29 | "serviceable": true,
30 | "sha512": "sha512-0NpDbrsJ+kTKtOEQH0RVbZmpsnCOBHkznA9Kov+u2xul+e2M10PCUO5a4ATZbuStOMcS/lSBYae/W/pCtJOL+Q==",
31 | "path": "nuget.build.packaging/0.2.2",
32 | "hashPath": "nuget.build.packaging.0.2.2.nupkg.sha512"
33 | }
34 | }
35 | }
--------------------------------------------------------------------------------
/FileSystemWatcher/bin/Release/netstandard2.1/FileSystemWatcher.deps.json:
--------------------------------------------------------------------------------
1 | {
2 | "runtimeTarget": {
3 | "name": ".NETStandard,Version=v2.1/",
4 | "signature": ""
5 | },
6 | "compilationOptions": {},
7 | "targets": {
8 | ".NETStandard,Version=v2.1": {},
9 | ".NETStandard,Version=v2.1/": {
10 | "FileSystemWatcher/1.0.0": {
11 | "dependencies": {
12 | "NuGet.Build.Packaging": "0.2.2"
13 | },
14 | "runtime": {
15 | "FileSystemWatcher.dll": {}
16 | }
17 | },
18 | "NuGet.Build.Packaging/0.2.2": {}
19 | }
20 | },
21 | "libraries": {
22 | "FileSystemWatcher/1.0.0": {
23 | "type": "project",
24 | "serviceable": false,
25 | "sha512": ""
26 | },
27 | "NuGet.Build.Packaging/0.2.2": {
28 | "type": "package",
29 | "serviceable": true,
30 | "sha512": "sha512-0NpDbrsJ+kTKtOEQH0RVbZmpsnCOBHkznA9Kov+u2xul+e2M10PCUO5a4ATZbuStOMcS/lSBYae/W/pCtJOL+Q==",
31 | "path": "nuget.build.packaging/0.2.2",
32 | "hashPath": "nuget.build.packaging.0.2.2.nupkg.sha512"
33 | }
34 | }
35 | }
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 AbdelhamidLarachi
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/FileSystemWatcher.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FileSystemWatcher", "FileSystemWatcher\FileSystemWatcher.csproj", "{2325E0D5-34A0-40BE-A68C-3ED81E186093}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Any CPU = Debug|Any CPU
9 | Release|Any CPU = Release|Any CPU
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {2325E0D5-34A0-40BE-A68C-3ED81E186093}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
13 | {2325E0D5-34A0-40BE-A68C-3ED81E186093}.Debug|Any CPU.Build.0 = Debug|Any CPU
14 | {2325E0D5-34A0-40BE-A68C-3ED81E186093}.Release|Any CPU.ActiveCfg = Release|Any CPU
15 | {2325E0D5-34A0-40BE-A68C-3ED81E186093}.Release|Any CPU.Build.0 = Release|Any CPU
16 | EndGlobalSection
17 | GlobalSection(MonoDevelopProperties) = preSolution
18 | description = " detect directory change and return renamed, moved, created, and deleted files. Able to spot renamed files without hashcode comparing or real time tracking. "
19 | EndGlobalSection
20 | EndGlobal
21 |
--------------------------------------------------------------------------------
/FileSystemWatcher/obj/Debug/netstandard2.1/FileSystemWatcher.csproj.FileListAbsolute.txt:
--------------------------------------------------------------------------------
1 | /Users/nginx-iwnl/Projects/FileSystemWatcher/FileSystemWatcher/bin/Debug/netstandard2.1/FileSystemWatcher.deps.json
2 | /Users/nginx-iwnl/Projects/FileSystemWatcher/FileSystemWatcher/bin/Debug/netstandard2.1/FileSystemWatcher.dll
3 | /Users/nginx-iwnl/Projects/FileSystemWatcher/FileSystemWatcher/bin/Debug/netstandard2.1/FileSystemWatcher.pdb
4 | /Users/nginx-iwnl/Projects/FileSystemWatcher/FileSystemWatcher/obj/Debug/netstandard2.1/FileSystemWatcher.csprojAssemblyReference.cache
5 | /Users/nginx-iwnl/Projects/FileSystemWatcher/FileSystemWatcher/obj/Debug/netstandard2.1/FileSystemWatcher.AssemblyInfoInputs.cache
6 | /Users/nginx-iwnl/Projects/FileSystemWatcher/FileSystemWatcher/obj/Debug/netstandard2.1/FileSystemWatcher.AssemblyInfo.cs
7 | /Users/nginx-iwnl/Projects/FileSystemWatcher/FileSystemWatcher/obj/Debug/netstandard2.1/FileSystemWatcher.csproj.CoreCompileInputs.cache
8 | /Users/nginx-iwnl/Projects/FileSystemWatcher/FileSystemWatcher/obj/Debug/netstandard2.1/FileSystemWatcher.dll
9 | /Users/nginx-iwnl/Projects/FileSystemWatcher/FileSystemWatcher/obj/Debug/netstandard2.1/FileSystemWatcher.pdb
10 |
--------------------------------------------------------------------------------
/.vs/FileSystemWatcher/xs/UserPrefs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/FileSystemWatcher/obj/Debug/netstandard2.1/FileSystemWatcher.AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | using System;
12 | using System.Reflection;
13 |
14 | [assembly: System.Reflection.AssemblyCompanyAttribute("Abdelhamid Larachi")]
15 | [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
16 | [assembly: System.Reflection.AssemblyCopyrightAttribute("Abdelhamid Larachi")]
17 | [assembly: System.Reflection.AssemblyDescriptionAttribute("detect directory change and return renamed, moved, created, and deleted files. Ab" +
18 | "le to spot renamed files without hashcode comparing or real time tracking.\r\n")]
19 | [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
20 | [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
21 | [assembly: System.Reflection.AssemblyProductAttribute("FileSystemWatcher")]
22 | [assembly: System.Reflection.AssemblyTitleAttribute("FileSystemWatcher")]
23 | [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
24 |
25 | // Generated by the MSBuild WriteCodeFragment class.
26 |
27 |
--------------------------------------------------------------------------------
/FileSystemWatcher/obj/Release/netstandard1.3/FileSystemWatcher.AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | using System;
12 | using System.Reflection;
13 |
14 | [assembly: System.Reflection.AssemblyCompanyAttribute("Abdelhamid Larachi")]
15 | [assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
16 | [assembly: System.Reflection.AssemblyCopyrightAttribute("Abdelhamid Larachi")]
17 | [assembly: System.Reflection.AssemblyDescriptionAttribute("detect directory change and return renamed, moved, created, and deleted files. Ab" +
18 | "le to spot renamed files without hashcode comparing or real time tracking.\n")]
19 | [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
20 | [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
21 | [assembly: System.Reflection.AssemblyProductAttribute("FileSystemWatcher")]
22 | [assembly: System.Reflection.AssemblyTitleAttribute("FileSystemWatcher")]
23 | [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
24 |
25 | // Generated by the MSBuild WriteCodeFragment class.
26 |
27 |
--------------------------------------------------------------------------------
/FileSystemWatcher/obj/Release/netstandard2.1/FileSystemWatcher.AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | using System;
12 | using System.Reflection;
13 |
14 | [assembly: System.Reflection.AssemblyCompanyAttribute("Abdelhamid Larachi")]
15 | [assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
16 | [assembly: System.Reflection.AssemblyCopyrightAttribute("Abdelhamid Larachi")]
17 | [assembly: System.Reflection.AssemblyDescriptionAttribute("detect directory change and return renamed, moved, created, and deleted files. Ab" +
18 | "le to spot renamed files without hashcode comparing or real time tracking.\r\n")]
19 | [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
20 | [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
21 | [assembly: System.Reflection.AssemblyProductAttribute("FileSystemWatcher")]
22 | [assembly: System.Reflection.AssemblyTitleAttribute("FileSystemWatcher")]
23 | [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
24 |
25 | // Generated by the MSBuild WriteCodeFragment class.
26 |
27 |
--------------------------------------------------------------------------------
/FileSystemWatcher/obj/FileSystemWatcher.csproj.nuget.g.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | True
5 | NuGet
6 | $(MSBuildThisFileDirectory)project.assets.json
7 | /Users/nginx-iwnl/.nuget/packages/
8 | /Users/nginx-iwnl/.nuget/packages/
9 | PackageReference
10 | 5.7.0
11 |
12 |
13 |
14 |
15 |
16 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/FileSystemWatcher/FileSystemWatcher.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.1
5 | detect directory change and return renamed, moved, created, and deleted files. Able to spot renamed files without hashcode comparing or real time tracking.
6 |
7 | AL-FileSystemWatcher
8 | Abdelhamid Larachi
9 | Abdelhamid Larachi
10 | Abdelhamid Larachi
11 | https://github.com/AbdelhamidLarachi/FileSystemWatcher
12 | detect directory change and return renamed, moved, created, and deleted files. Able to spot renamed files without hashcode comparing or real time tracking.
13 | detect directory change and return renamed, moved, created, and deleted files. Able to spot renamed files without hashcode comparing or real time tracking.
14 |
15 | filesystemwatcher directory file track files rename change
16 | FileSystemWatcher
17 | true
18 | https://github.com/AbdelhamidLarachi/FileSystemWatcher/blob/master/LICENSE
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | true
27 |
28 |
29 |
30 |
31 | runtime; build; native; contentfiles; analyzers; buildtransitive
32 | all
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/FileSystemWatcher/obj/FileSystemWatcher.csproj.nuget.dgspec.json:
--------------------------------------------------------------------------------
1 | {
2 | "format": 1,
3 | "restore": {
4 | "/Users/nginx-iwnl/Projects/FileSystemWatcher/FileSystemWatcher/FileSystemWatcher.csproj": {}
5 | },
6 | "projects": {
7 | "/Users/nginx-iwnl/Projects/FileSystemWatcher/FileSystemWatcher/FileSystemWatcher.csproj": {
8 | "version": "1.0.0",
9 | "restore": {
10 | "projectUniqueName": "/Users/nginx-iwnl/Projects/FileSystemWatcher/FileSystemWatcher/FileSystemWatcher.csproj",
11 | "projectName": "AL-FileSystemWatcher",
12 | "projectPath": "/Users/nginx-iwnl/Projects/FileSystemWatcher/FileSystemWatcher/FileSystemWatcher.csproj",
13 | "packagesPath": "/Users/nginx-iwnl/.nuget/packages/",
14 | "outputPath": "/Users/nginx-iwnl/Projects/FileSystemWatcher/FileSystemWatcher/obj/",
15 | "projectStyle": "PackageReference",
16 | "configFilePaths": [
17 | "/Users/nginx-iwnl/.config/NuGet/NuGet.Config"
18 | ],
19 | "originalTargetFrameworks": [
20 | "netstandard2.1"
21 | ],
22 | "sources": {
23 | "https://api.nuget.org/v3/index.json": {}
24 | },
25 | "frameworks": {
26 | "netstandard2.1": {
27 | "projectReferences": {}
28 | }
29 | },
30 | "warningProperties": {
31 | "warnAsError": [
32 | "NU1605"
33 | ]
34 | }
35 | },
36 | "frameworks": {
37 | "netstandard2.1": {
38 | "dependencies": {
39 | "NuGet.Build.Packaging": {
40 | "include": "Runtime, Build, Native, ContentFiles, Analyzers, BuildTransitive",
41 | "suppressParent": "All",
42 | "target": "Package",
43 | "version": "[0.2.2, )"
44 | }
45 | },
46 | "imports": [
47 | "net461",
48 | "net462",
49 | "net47",
50 | "net471",
51 | "net472",
52 | "net48"
53 | ],
54 | "assetTargetFallback": true,
55 | "warn": true,
56 | "frameworkReferences": {
57 | "NETStandard.Library": {
58 | "privateAssets": "all"
59 | }
60 | },
61 | "runtimeIdentifierGraphPath": "/usr/local/share/dotnet/sdk/3.1.403/RuntimeIdentifierGraph.json"
62 | }
63 | }
64 | }
65 | }
66 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | FileSystemWatcher [](https://github.com/AbdelhamidLarachi/FileSystemWatcher/blob/master/FileSystemWatcher/LICENSE) [](https://www.nuget.org/packages/AL-FileSystemWatcher/)
2 | ========
3 |
4 | `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+`.
5 |
6 | ## Examples
7 |
8 | Use it like the following example :
9 |
10 | ```csharp
11 | namespace FileSystemWatcher
12 | {
13 | class Program
14 | {
15 | static void Main(string[] args)
16 | {
17 | // Choose a directory to watch
18 | string directory = @"/Users/nginx-iwnl/Desktop/Project";
19 |
20 | // Initialize directory
21 | FileSystemWatcher.BeginInit(directory);
22 |
23 | // Optional: using ignore patterns
24 | string[] ignore = { ".exe", "/node_modules" };
25 | FileSystemWatcher.BeginInit(directory, ignore);
26 | }
27 | }
28 | }
29 | ```
30 |
31 | - Apply changes to your directory ..... (rename, delete...)
32 | - Get results by calling `EndInit`
33 |
34 | ```csharp
35 | using System;
36 |
37 | namespace FileSystemWatcher
38 | {
39 | class Program
40 | {
41 | static void Main(string[] args)
42 | {
43 | // Choose a directory to watch
44 | string directory = @"/Users/nginx-iwnl/Desktop/Project";
45 |
46 | // End directory watch
47 | ChangeModel result = FileSystemWatcher.EndInit(directory);
48 |
49 | // Print Result
50 | Console.WriteLine("Directory has changed : {0}", result.HasChanged);
51 | Console.WriteLine("\n----Created Files:");
52 |
53 | foreach (var file in result.Changes.created)
54 | Console.WriteLine(file);
55 |
56 | Console.WriteLine("\n----Deleted Files:");
57 |
58 | foreach (var file in result.Changes.deleted)
59 | Console.WriteLine(file);
60 |
61 | Console.WriteLine("\n----Renamed Files:");
62 |
63 | foreach (var file in result.Changes.renamed)
64 | Console.WriteLine("{0} => {1}", file.prevName, file.name);
65 |
66 | Console.WriteLine("\n----Changed Files:");
67 |
68 | foreach (var file in result.Changes.changed)
69 | Console.WriteLine("{0} with {1}% match", file.filename, file.match);
70 | }
71 | }
72 | }
73 |
74 | ```
75 |
76 | expected result:
77 |
78 | 
79 |
80 | provided implementations:
81 |
82 | - `created files`
83 | - `deleted files`
84 | - `renamed files`
85 | - `moved files`
86 | - `changed files with similarity percentage %`
87 |
--------------------------------------------------------------------------------
/FileSystemWatcher/obj/project.assets.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": 3,
3 | "targets": {
4 | ".NETStandard,Version=v2.1": {
5 | "NuGet.Build.Packaging/0.2.2": {
6 | "type": "package",
7 | "build": {
8 | "build/NuGet.Build.Packaging.props": {},
9 | "build/NuGet.Build.Packaging.targets": {}
10 | }
11 | }
12 | }
13 | },
14 | "libraries": {
15 | "NuGet.Build.Packaging/0.2.2": {
16 | "sha512": "0NpDbrsJ+kTKtOEQH0RVbZmpsnCOBHkznA9Kov+u2xul+e2M10PCUO5a4ATZbuStOMcS/lSBYae/W/pCtJOL+Q==",
17 | "type": "package",
18 | "path": "nuget.build.packaging/0.2.2",
19 | "files": [
20 | ".nupkg.metadata",
21 | ".signature.p7s",
22 | "build/ApiIntersect.exe",
23 | "build/ApiIntersect.exe.config",
24 | "build/GenerateReferenceAssembly.csproj",
25 | "build/ICSharpCode.Decompiler.dll",
26 | "build/ICSharpCode.NRefactory.CSharp.dll",
27 | "build/ICSharpCode.NRefactory.Cecil.dll",
28 | "build/ICSharpCode.NRefactory.Xml.dll",
29 | "build/ICSharpCode.NRefactory.dll",
30 | "build/Mono.Cecil.Mdb.dll",
31 | "build/Mono.Cecil.Pdb.dll",
32 | "build/Mono.Cecil.Rocks.dll",
33 | "build/Mono.Cecil.dll",
34 | "build/Mono.Options.dll",
35 | "build/NuGet.Build.Packaging.Authoring.props",
36 | "build/NuGet.Build.Packaging.Authoring.targets",
37 | "build/NuGet.Build.Packaging.Compatibility.props",
38 | "build/NuGet.Build.Packaging.Inference.targets",
39 | "build/NuGet.Build.Packaging.Legacy.props",
40 | "build/NuGet.Build.Packaging.Legacy.targets",
41 | "build/NuGet.Build.Packaging.ReferenceAssembly.targets",
42 | "build/NuGet.Build.Packaging.Tasks.dll",
43 | "build/NuGet.Build.Packaging.Tasks.pdb",
44 | "build/NuGet.Build.Packaging.Version.props",
45 | "build/NuGet.Build.Packaging.props",
46 | "build/NuGet.Build.Packaging.targets",
47 | "buildMultiTargeting/NuGet.Build.Packaging.MultiTargeting.targets",
48 | "nuget.build.packaging.0.2.2.nupkg.sha512",
49 | "nuget.build.packaging.nuspec"
50 | ]
51 | }
52 | },
53 | "projectFileDependencyGroups": {
54 | ".NETStandard,Version=v2.1": [
55 | "NuGet.Build.Packaging >= 0.2.2"
56 | ]
57 | },
58 | "packageFolders": {
59 | "/Users/nginx-iwnl/.nuget/packages/": {}
60 | },
61 | "project": {
62 | "version": "1.0.0",
63 | "restore": {
64 | "projectUniqueName": "/Users/nginx-iwnl/Projects/FileSystemWatcher/FileSystemWatcher/FileSystemWatcher.csproj",
65 | "projectName": "AL-FileSystemWatcher",
66 | "projectPath": "/Users/nginx-iwnl/Projects/FileSystemWatcher/FileSystemWatcher/FileSystemWatcher.csproj",
67 | "packagesPath": "/Users/nginx-iwnl/.nuget/packages/",
68 | "outputPath": "/Users/nginx-iwnl/Projects/FileSystemWatcher/FileSystemWatcher/obj/",
69 | "projectStyle": "PackageReference",
70 | "configFilePaths": [
71 | "/Users/nginx-iwnl/.config/NuGet/NuGet.Config"
72 | ],
73 | "originalTargetFrameworks": [
74 | "netstandard2.1"
75 | ],
76 | "sources": {
77 | "https://api.nuget.org/v3/index.json": {}
78 | },
79 | "frameworks": {
80 | "netstandard2.1": {
81 | "projectReferences": {}
82 | }
83 | },
84 | "warningProperties": {
85 | "warnAsError": [
86 | "NU1605"
87 | ]
88 | }
89 | },
90 | "frameworks": {
91 | "netstandard2.1": {
92 | "dependencies": {
93 | "NuGet.Build.Packaging": {
94 | "include": "Runtime, Build, Native, ContentFiles, Analyzers, BuildTransitive",
95 | "suppressParent": "All",
96 | "target": "Package",
97 | "version": "[0.2.2, )"
98 | }
99 | },
100 | "imports": [
101 | "net461",
102 | "net462",
103 | "net47",
104 | "net471",
105 | "net472",
106 | "net48"
107 | ],
108 | "assetTargetFallback": true,
109 | "warn": true,
110 | "frameworkReferences": {
111 | "NETStandard.Library": {
112 | "privateAssets": "all"
113 | }
114 | },
115 | "runtimeIdentifierGraphPath": "/usr/local/share/dotnet/sdk/3.1.403/RuntimeIdentifierGraph.json"
116 | }
117 | }
118 | }
119 | }
--------------------------------------------------------------------------------
/.vs/FileSystemWatcher/xs/project-cache/FileSystemWatcher-Debug.json:
--------------------------------------------------------------------------------
1 | {"Format":1,"ProjectReferences":[],"MetadataReferences":[{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/Microsoft.Win32.Primitives.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/mscorlib.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/netstandard.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.AppContext.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Buffers.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Collections.Concurrent.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Collections.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Collections.NonGeneric.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Collections.Specialized.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.ComponentModel.Composition.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.ComponentModel.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.ComponentModel.EventBasedAsync.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.ComponentModel.Primitives.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.ComponentModel.TypeConverter.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Console.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Core.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Data.Common.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Data.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Diagnostics.Contracts.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Diagnostics.Debug.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Diagnostics.FileVersionInfo.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Diagnostics.Process.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Diagnostics.StackTrace.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Diagnostics.TextWriterTraceListener.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Diagnostics.Tools.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Diagnostics.TraceSource.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Diagnostics.Tracing.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Drawing.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Drawing.Primitives.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Dynamic.Runtime.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Globalization.Calendars.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Globalization.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Globalization.Extensions.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.IO.Compression.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.IO.Compression.FileSystem.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.IO.Compression.ZipFile.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.IO.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.IO.FileSystem.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.IO.FileSystem.DriveInfo.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.IO.FileSystem.Primitives.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.IO.FileSystem.Watcher.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.IO.IsolatedStorage.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.IO.MemoryMappedFiles.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.IO.Pipes.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.IO.UnmanagedMemoryStream.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Linq.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Linq.Expressions.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Linq.Parallel.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Linq.Queryable.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Memory.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Net.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Net.Http.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Net.NameResolution.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Net.NetworkInformation.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Net.Ping.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Net.Primitives.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Net.Requests.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Net.Security.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Net.Sockets.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Net.WebHeaderCollection.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Net.WebSockets.Client.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Net.WebSockets.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Numerics.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Numerics.Vectors.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.ObjectModel.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Reflection.DispatchProxy.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Reflection.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Reflection.Emit.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Reflection.Emit.ILGeneration.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Reflection.Emit.Lightweight.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Reflection.Extensions.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Reflection.Primitives.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Resources.Reader.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Resources.ResourceManager.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Resources.Writer.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Runtime.CompilerServices.VisualC.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Runtime.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Runtime.Extensions.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Runtime.Handles.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Runtime.InteropServices.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Runtime.InteropServices.RuntimeInformation.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Runtime.Numerics.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Runtime.Serialization.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Runtime.Serialization.Formatters.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Runtime.Serialization.Json.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Runtime.Serialization.Primitives.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Runtime.Serialization.Xml.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Security.Claims.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Security.Cryptography.Algorithms.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Security.Cryptography.Csp.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Security.Cryptography.Encoding.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Security.Cryptography.Primitives.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Security.Cryptography.X509Certificates.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Security.Principal.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Security.SecureString.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.ServiceModel.Web.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Text.Encoding.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Text.Encoding.Extensions.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Text.RegularExpressions.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Threading.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Threading.Overlapped.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Threading.Tasks.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Threading.Tasks.Extensions.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Threading.Tasks.Parallel.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Threading.Thread.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Threading.ThreadPool.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Threading.Timer.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Transactions.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.ValueTuple.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Web.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Windows.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Xml.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Xml.Linq.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Xml.ReaderWriter.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Xml.Serialization.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Xml.XDocument.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Xml.XmlDocument.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Xml.XmlSerializer.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Xml.XPath.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Xml.XPath.XDocument.dll","Aliases":[],"Framework":null}],"Files":["/Users/nginx-iwnl/Projects/FileSystemWatcher/FileSystemWatcher/FileSystemWatcher.cs","/Users/nginx-iwnl/Projects/FileSystemWatcher/FileSystemWatcher/.DS_Store","/Users/nginx-iwnl/Projects/FileSystemWatcher/FileSystemWatcher/obj/Debug/netstandard2.1/FileSystemWatcher.AssemblyInfo.cs","/Users/nginx-iwnl/Projects/FileSystemWatcher/FileSystemWatcher/obj/Debug/netstandard2.1/FileSystemWatcher.AssemblyInfo.cs","/Users/nginx-iwnl/Projects/FileSystemWatcher/FileSystemWatcher/obj/Debug/netstandard2.1/FileSystemWatcher.AssemblyInfo.cs"],"BuildActions":["Compile","None","Compile","Compile","Compile"],"Analyzers":[],"AdditionalFiles":[],"EditorConfigFiles":[]}
--------------------------------------------------------------------------------
/.vs/FileSystemWatcher/xs/project-cache/FileSystemWatcher-Release.json:
--------------------------------------------------------------------------------
1 | {"Format":1,"ProjectReferences":[],"MetadataReferences":[{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/Microsoft.Win32.Primitives.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/mscorlib.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/netstandard.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.AppContext.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Buffers.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Collections.Concurrent.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Collections.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Collections.NonGeneric.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Collections.Specialized.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.ComponentModel.Composition.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.ComponentModel.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.ComponentModel.EventBasedAsync.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.ComponentModel.Primitives.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.ComponentModel.TypeConverter.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Console.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Core.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Data.Common.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Data.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Diagnostics.Contracts.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Diagnostics.Debug.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Diagnostics.FileVersionInfo.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Diagnostics.Process.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Diagnostics.StackTrace.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Diagnostics.TextWriterTraceListener.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Diagnostics.Tools.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Diagnostics.TraceSource.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Diagnostics.Tracing.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Drawing.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Drawing.Primitives.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Dynamic.Runtime.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Globalization.Calendars.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Globalization.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Globalization.Extensions.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.IO.Compression.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.IO.Compression.FileSystem.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.IO.Compression.ZipFile.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.IO.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.IO.FileSystem.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.IO.FileSystem.DriveInfo.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.IO.FileSystem.Primitives.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.IO.FileSystem.Watcher.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.IO.IsolatedStorage.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.IO.MemoryMappedFiles.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.IO.Pipes.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.IO.UnmanagedMemoryStream.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Linq.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Linq.Expressions.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Linq.Parallel.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Linq.Queryable.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Memory.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Net.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Net.Http.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Net.NameResolution.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Net.NetworkInformation.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Net.Ping.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Net.Primitives.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Net.Requests.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Net.Security.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Net.Sockets.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Net.WebHeaderCollection.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Net.WebSockets.Client.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Net.WebSockets.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Numerics.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Numerics.Vectors.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.ObjectModel.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Reflection.DispatchProxy.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Reflection.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Reflection.Emit.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Reflection.Emit.ILGeneration.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Reflection.Emit.Lightweight.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Reflection.Extensions.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Reflection.Primitives.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Resources.Reader.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Resources.ResourceManager.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Resources.Writer.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Runtime.CompilerServices.VisualC.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Runtime.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Runtime.Extensions.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Runtime.Handles.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Runtime.InteropServices.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Runtime.InteropServices.RuntimeInformation.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Runtime.Numerics.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Runtime.Serialization.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Runtime.Serialization.Formatters.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Runtime.Serialization.Json.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Runtime.Serialization.Primitives.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Runtime.Serialization.Xml.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Security.Claims.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Security.Cryptography.Algorithms.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Security.Cryptography.Csp.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Security.Cryptography.Encoding.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Security.Cryptography.Primitives.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Security.Cryptography.X509Certificates.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Security.Principal.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Security.SecureString.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.ServiceModel.Web.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Text.Encoding.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Text.Encoding.Extensions.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Text.RegularExpressions.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Threading.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Threading.Overlapped.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Threading.Tasks.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Threading.Tasks.Extensions.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Threading.Tasks.Parallel.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Threading.Thread.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Threading.ThreadPool.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Threading.Timer.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Transactions.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.ValueTuple.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Web.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Windows.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Xml.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Xml.Linq.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Xml.ReaderWriter.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Xml.Serialization.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Xml.XDocument.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Xml.XmlDocument.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Xml.XmlSerializer.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Xml.XPath.dll","Aliases":[],"Framework":null},{"FilePath":"/usr/local/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Xml.XPath.XDocument.dll","Aliases":[],"Framework":null}],"Files":["/Users/nginx-iwnl/Projects/FileSystemWatcher/FileSystemWatcher/FileSystemWatcher.cs","/Users/nginx-iwnl/Projects/FileSystemWatcher/FileSystemWatcher/watcher.png","/Users/nginx-iwnl/Projects/FileSystemWatcher/FileSystemWatcher/.DS_Store","/Users/nginx-iwnl/Projects/FileSystemWatcher/FileSystemWatcher/LICENSE","/Users/nginx-iwnl/Projects/FileSystemWatcher/FileSystemWatcher/obj/Release/netstandard2.1/FileSystemWatcher.AssemblyInfo.cs","/Users/nginx-iwnl/Projects/FileSystemWatcher/FileSystemWatcher/obj/Release/netstandard2.1/FileSystemWatcher.AssemblyInfo.cs","/Users/nginx-iwnl/Projects/FileSystemWatcher/FileSystemWatcher/obj/Release/netstandard2.1/FileSystemWatcher.AssemblyInfo.cs"],"BuildActions":["Compile","None","None","None","Compile","Compile","Compile"],"Analyzers":[],"AdditionalFiles":[],"EditorConfigFiles":[]}
--------------------------------------------------------------------------------
/FileSystemWatcher/FileSystemWatcher.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // Copyright (c) Abdelhamid Larachi. All rights reserved.
4 | //
5 | //------------------------------------------------------------------------------
6 |
7 | using System;
8 | using System.Collections.Generic;
9 | using System.IO;
10 | using System.Linq;
11 |
12 | namespace FileSystemWatcher
13 | {
14 |
15 | ///
16 | /// detect directory change and return renamed, moved, created, and deleted files.
17 | /// Able to spot renamed files without hashcode comparing or real time tracking.
18 | ///
19 |
20 |
21 | public enum Operation
22 | {
23 | DELETED, CHANGED, RENAMED, MOVED
24 | }
25 |
26 |
27 | public class FileSystemInitializer
28 | {
29 | // watched directory files
30 | private string[] files;
31 | // watched directory
32 | private string directory;
33 | // hidden directory to store initial state
34 | private string initialstate;
35 |
36 |
37 | ///
38 | /// Sets file read access permission
39 | /// file path
40 | /// read attribute
41 | ///
42 |
43 |
44 | private void SetFileReadAccess(string FileName, bool readOnly)
45 | {
46 | File.SetAttributes(FileName, File.GetAttributes(FileName) & (readOnly ? FileAttributes.ReadOnly : ~FileAttributes.ReadOnly));
47 | }
48 |
49 |
50 | ///
51 | /// Check if file is read-only
52 | /// file path
53 | /// returns true if readable only
54 | ///
55 |
56 |
57 | private bool IsFileReadOnly(string FileName)
58 | {
59 | return new FileInfo(FileName).IsReadOnly;
60 | }
61 |
62 |
63 | ///
64 | /// Get every file creation time in ticks
65 | /// directory files list
66 | /// list of creation time in ticks
67 | ///
68 |
69 |
70 | private long[] GetAllFilesCreationTime(string[] paths)
71 | {
72 | List creation_time = new List();
73 |
74 | foreach (string path in paths)
75 | creation_time.Add(File.GetCreationTime(path).Ticks);
76 |
77 | return creation_time.ToArray();
78 | }
79 |
80 |
81 |
82 | ///
83 | /// Set creation time attribute for file.
84 | /// At this point at least FilePermission has already been demanded.
85 | /// string file path
86 | /// creation time
87 | /// throw UnauthorizedAccessException if access is denied and file is dublicated
88 | ///
89 |
90 |
91 | private void SetCreationTime(string FileName, DateTime datetime)
92 | {
93 | try
94 | {
95 | File.SetCreationTime(FileName, datetime);
96 |
97 | }
98 | catch (UnauthorizedAccessException)
99 | {
100 |
101 | /* if unauthorized & other file with same ticks
102 | * exists, then exit to prevent files conflict,
103 | * if not then its safe to ignore */
104 |
105 | if (ExistsWithSameTicks(datetime.Ticks))
106 | throw new UnauthorizedAccessException();
107 | }
108 | }
109 |
110 |
111 | ///
112 | /// Check if any file hold exact same creation time in ticks attributes
113 | /// creation time by ticks
114 | /// Return true if found
115 | ///
116 |
117 |
118 | private bool ExistsWithSameTicks(long value)
119 | {
120 | long[] ticks = GetAllFilesCreationTime(files);
121 | return ticks.ToList().Contains(value);
122 | }
123 |
124 |
125 | ///
126 | /// Check if any ticks value is dublicated in another file
127 | /// directory files
128 | /// Return true if found
129 | ///
130 |
131 |
132 | private bool HasSameTicks(string[] files)
133 | {
134 | long[] ticks = GetAllFilesCreationTime(files);
135 | return ticks.Length != ticks.Distinct().Count();
136 | }
137 |
138 |
139 |
140 | ///
141 | /// Copy sub-directories to initial directory
142 | /// default/user ignored files
143 | ///
144 |
145 |
146 |
147 | private void WriteDirectories(string[] ignored)
148 | {
149 | string[] directories = Directory.GetDirectories(directory, "*", SearchOption.AllDirectories).Where(dir => !ignored.Any(ignored => dir.Contains(ignored))).ToArray();
150 |
151 | foreach (string dirPath in directories)
152 | {
153 | if (!ignored.Any(ignored => dirPath.Contains(ignored)))
154 | Directory.CreateDirectory(dirPath.Replace(directory, initialstate));
155 | }
156 | }
157 |
158 |
159 |
160 | ///
161 | /// Copy files to initial directory
162 | /// default/user ignored files
163 | ///
164 |
165 |
166 | private void WriteFiles(string[] ignored)
167 | {
168 | files = Directory.GetFiles(directory, "*", SearchOption.AllDirectories).Where(dir => !ignored.Any(ignored => dir.Contains(ignored))).ToArray();
169 | bool _HasSameTicks = HasSameTicks(files);
170 | int tick = 0;
171 |
172 | foreach (string filename in files)
173 | {
174 | if (!ignored.Any(ignored => filename.Contains(ignored)))
175 | {
176 | // get read access if file is read-only
177 | if (!IsFileReadOnly(filename))
178 | SetFileReadAccess(filename, false);
179 |
180 | string path = filename.Replace(directory, initialstate);
181 |
182 | /* add negligible n tick to file creation time to set a unique creation time
183 | for each file while we keep exact same creation time. */
184 |
185 | DateTime creation_time = File.GetCreationTime(filename);
186 | if (_HasSameTicks) { creation_time.AddTicks(tick); }
187 |
188 | // copy file to initial state dir
189 | File.Copy(filename, path, true);
190 | // set same creation time on target
191 | SetCreationTime(path, creation_time);
192 |
193 | if (_HasSameTicks)
194 | {
195 | SetCreationTime(filename, creation_time);
196 |
197 | /*
198 | * Rewrite files in directory, to force setting creation time.
199 | * in some disks formats, setting creation time with permissions doesn't take change everytime,
200 | * rewriting the file then setting creation time does the trick.
201 | */
202 |
203 | if (DateTime.Compare(File.GetCreationTime(filename), creation_time) != 0)
204 | {
205 | File.Copy(path, filename, true);
206 | SetCreationTime(filename, creation_time);
207 | }
208 | }
209 |
210 | tick++;
211 | }
212 | }
213 | }
214 |
215 |
216 |
217 |
218 | ///
219 | /// Create hidden initial snapshot folder for current directory
220 | ///
221 |
222 |
223 |
224 | public void CreateHiddenDirectory()
225 | {
226 | // set initial directory state in .initialstate
227 | initialstate = Path.Combine(directory, ".initialstate");
228 | if (Directory.Exists(initialstate)) Directory.Delete(initialstate, true);
229 |
230 | DirectoryInfo di = Directory.CreateDirectory(initialstate);
231 | di.Attributes = FileAttributes.Directory | FileAttributes.Hidden;
232 | }
233 |
234 |
235 |
236 | ///
237 | /// Take a directory snapshot before changes
238 | /// directory source string
239 | /// default/user ignored files
240 | ///
241 |
242 |
243 | public void Init(string dir, string[] ignored)
244 | {
245 | directory = dir;
246 | // create initial directory
247 | CreateHiddenDirectory();
248 | // copy directories
249 | WriteDirectories(ignored);
250 | // copy files
251 | WriteFiles(ignored);
252 | }
253 |
254 | }
255 |
256 |
257 |
258 | /**
259 | * * Class representing one directory changes Modal.
260 | */
261 |
262 | public class ChangeModel
263 | {
264 | public Changes Changes { get; set; }
265 | // returns true if directory has changed
266 | public bool HasChanged { get; set; }
267 | }
268 |
269 |
270 | /**
271 | * * Class representing changes Object lists.
272 | */
273 |
274 | public class Changes
275 | {
276 | public List renamed { get; set; }
277 | public List changed { get; set; }
278 | public List deleted { get; set; }
279 | public List created { get; set; }
280 | }
281 |
282 |
283 | /**
284 | * * Class representing Renamed file Objects.
285 | */
286 |
287 | public class Renamed
288 | {
289 | // previous name
290 | public string prevName { get; set; }
291 | // new / current name
292 | public string name { get; set; }
293 | // returns true if file is moved
294 | public bool moved { get; set; }
295 | // returns % of renamed action accuracy
296 | public double similarity { get; set; }
297 | }
298 |
299 |
300 | /**
301 | * * Class representing Changed/Rewritten file Objects.
302 | */
303 |
304 | public class Rewritten
305 | {
306 | public string filename { get; set; }
307 | // % similarity with old content
308 | public double match { get; set; }
309 | }
310 |
311 |
312 |
313 |
314 | public static class FileSystemWatcher
315 | {
316 | // system and other files to ignore
317 |
318 | readonly static string[] ignore_default = {
319 | // dependency_caches
320 | "/node_modules", "/packages",
321 | // compiled_code
322 | ".pyc", ".o", ".class",
323 | // build_output_dir
324 | "/bin", "/out", "/target",
325 | // runtime_files
326 | ".log", ".lock", ".tmp",
327 | // system_files
328 | ".DS_Store", "Thumbs.db",
329 | // config_files
330 | ".idea/workspace.xml",
331 | // git
332 | ".git", ".watchmanconfig", ".initialstate"
333 | };
334 |
335 |
336 | /*
337 | * Initialize directory, create snapshot, get permissions.
338 | * @param directory path of directory.
339 | * @param ignore contains list of ignored patterns.
340 | */
341 |
342 |
343 | public static void BeginInit(string directory, string[] ignore = null)
344 | {
345 | if (!Directory.Exists(directory))
346 | throw new DirectoryNotFoundException();
347 |
348 | // Concat default with user input
349 | if (ignore == null) { ignore = new string[] { }; }
350 | ignore = ignore_default.Union(ignore).ToArray();
351 |
352 | new FileSystemInitializer().Init(directory, ignore);
353 | }
354 |
355 |
356 | /*
357 | * Get directory files action by groupe (created, deleted, renamed, changed)
358 | * @param directory path of initialized directory.
359 | * @return RENAMED, CREATED, DELETED, CHANGED files Object list.
360 | */
361 |
362 | public static ChangeModel EndInit(string directory)
363 | {
364 | if (!Directory.Exists(directory))
365 | throw new DirectoryNotFoundException();
366 |
367 | return new FileSystemChangeHandler().End(directory, ignore_default);
368 | }
369 |
370 | }
371 |
372 |
373 |
374 |
375 |
376 | public class FileSystemChangeHandler
377 | {
378 | // watched directory
379 | private string directory;
380 | // hidden directory to store initial state
381 | private string initialstate;
382 | // initial directory files
383 | private string[] initialDir;
384 | // current/new directory files
385 | private string[] CurrentDir;
386 |
387 |
388 | ///
389 | /// Calculate percentage similarity of two strings
390 | /// Source String to Compare with
391 | /// Targeted String to Compare
392 | /// Return Similarity between two strings from 0 to 1.0
393 | ///
394 |
395 |
396 | public double CalculateSimilarity(string source, string target)
397 | {
398 | if ((source == null) || (target == null)) return 0.0;
399 | if ((source.Length == 0) || (target.Length == 0)) return 0.0;
400 | if (source == target) return 100.0;
401 |
402 | char[] pattern = { '\n', '\r', ' ' };
403 | string[] initial = source.Split(pattern);
404 | string[] final = target.Split(pattern);
405 |
406 | if (source.Length > target.Length) return initial.Count(x => final.Contains(x)) * 100 / initial.Length;
407 | else return final.Count(x => initial.Contains(x)) * 100 / final.Length;
408 |
409 | }
410 |
411 | /*
412 | * Convert full path list to relative path list
413 | * @param fullpaths full path list.
414 | * @param relativeTo directory which they are relative to.
415 | * @return relative path list.
416 | */
417 |
418 | public List Pretify(List fullpaths, string relativeTo)
419 | {
420 | for (int i = 0; i < fullpaths.Count; i++)
421 | fullpaths[i] = Path.GetRelativePath(relativeTo, fullpaths[i]);
422 | // relative paths
423 | return fullpaths;
424 | }
425 |
426 | /*
427 | * Get directory files action by groupe (created, deleted, renamed, changed)
428 | * @param dir path of initialized directory.
429 | * @param ignored contains default ignored system files.
430 | * @return RENAMED, CREATED, DELETED, CHANGED files Object list.
431 | */
432 |
433 |
434 | public ChangeModel End(string dir, string[] ignored)
435 | {
436 | if (!Directory.Exists(dir))
437 | throw new DirectoryNotFoundException();
438 |
439 | // get watched directory
440 | directory = dir;
441 | // get initial snapshot of watched directory
442 | initialstate = Path.Combine(dir, ".initialstate");
443 |
444 | // Get initial and final directory snapshot
445 | initialDir = GetInitialDirectoryFiles();
446 | CurrentDir = Directory.GetFiles(dir, "*", SearchOption.AllDirectories).Where(dir => !ignored.Any(ignored => dir.Contains(ignored))).ToArray();
447 |
448 | // Get differance between initial and final directory
449 | List created = CurrentDir.Except(initialDir).ToList();
450 | List deleted = initialDir.Except(CurrentDir).ToList();
451 |
452 | // Get renamed files from created & deleted
453 | List renamed = GetRenamed(created, deleted);
454 |
455 | // Filter renamed files from created & deleted and
456 | created = Pretify(created, directory).Select(x => x).Except(renamed.Select(y => y.name)).ToList();
457 | deleted = Pretify(deleted, directory).Select(x => x).Except(renamed.Select(y => y.prevName)).ToList();
458 |
459 | List rewritten = GetRewritten(created);
460 |
461 | return new ChangeModel
462 | {
463 | HasChanged = (created.Count + deleted.Count + renamed.Count + rewritten.Count) != 0,
464 | Changes = new Changes
465 | {
466 | created = created,
467 | deleted = deleted,
468 | renamed = renamed,
469 | // Get rewritten files filtred from created files
470 | changed = rewritten
471 | }
472 | };
473 | }
474 |
475 |
476 |
477 | /*
478 | * Convert directory filename to initial directory filename
479 | * @return initial filename.
480 | */
481 |
482 | public string GetInitialFilename(string filename)
483 | {
484 | return filename.Replace(directory, initialstate);
485 | }
486 |
487 | /*
488 | * Convert initial directory filename to current directory filename
489 | * @return directory filename.
490 | */
491 |
492 | public string GetDirectoryFilename(string filename)
493 | {
494 | return filename.Replace(initialstate, directory);
495 | }
496 |
497 | /*
498 | * Get Initial Directory files attributes with current directory filenames
499 | * @return initial directory.
500 | */
501 |
502 | public string[] GetInitialDirectoryFiles()
503 | {
504 | string[] initial = Directory.GetFiles(initialstate, "*", SearchOption.AllDirectories);
505 |
506 | for (int i = 0; i < initial.Length; i++)
507 | {
508 | initial[i] = GetDirectoryFilename(initial[i]);
509 | //Console.WriteLine(initial[i]);
510 | }
511 |
512 | return initial;
513 | }
514 |
515 |
516 |
517 | /*
518 | * Find highest match between a groupe of files
519 | * @param matches list of files with same creation time.
520 | * @param file filename of processing file.
521 | * @return (string filename with highest match, similarity percentage).
522 | */
523 |
524 |
525 |
526 | public (string, double) GetHighestMatch(List matches, string file)
527 | {
528 | if (matches.Count > 1)
529 | {
530 | List values = new List();
531 |
532 | foreach (string match in matches)
533 | values.Add(CalculateSimilarity(File.ReadAllText(file), File.ReadAllText(match)));
534 | return (matches[values.IndexOf(values.Max())], values.Max());
535 | }
536 | else
537 | return (matches[0], 100);
538 | }
539 |
540 |
541 |
542 | /*
543 | * a renamed file is recognized as deleted then created file
544 | * Extract renamed files from deleted and created arrays, using file's creation time ticks as an identifier.
545 | * (MacOs) on dublicate when user create a new file by copying an old one, will also copy the exact same attributes which will create a conflict between files because of dublicated ticks,
546 | * while on (windows) it will set a new creation time for the file.
547 | * To prevent MacOS conflicts, on multiple matches, files will be compared and take out the file with more similarity.
548 | * similarity object property will be needed when file is not 100% renamed.
549 | * @param created files considered as created.
550 | * @param deleted files considered as deleted.
551 | * @return List of renamed objects.
552 | */
553 |
554 |
555 | public List GetRenamed(List created, List deleted)
556 | {
557 |
558 | List renamed = new List();
559 |
560 | foreach (string f in deleted)
561 | {
562 | // get file path on directory
563 | string file = GetInitialFilename(f);
564 | // get file creation time by ticks
565 | long ticks = File.GetCreationTime(file).Ticks;
566 | // find all files with same ticks value
567 | List matches = created.FindAll(filename => File.GetCreationTime(filename).Ticks == ticks);
568 |
569 |
570 | if (matches.Count != 0)
571 | {
572 | // if multiple matches return highest match.
573 | (string, double) res = GetHighestMatch(matches, file);
574 | string filename = res.Item1;
575 | double match = res.Item2;
576 |
577 | // get relative path in initial directory
578 | string prevName = Path.GetRelativePath(initialstate, file);
579 | // get relative path in current directory
580 | string name = Path.GetRelativePath(directory, filename);
581 |
582 | if (prevName != name)
583 | {
584 | renamed.Add(
585 | new Renamed
586 | {
587 | prevName = prevName,
588 | name = name,
589 | // if file is moved or renamed
590 | moved = Path.GetFileName(file) == Path.GetFileName(filename),
591 | // % of renamed action
592 | similarity = match
593 | });
594 | }
595 | }
596 | }
597 |
598 | return renamed;
599 | }
600 |
601 |
602 | /*
603 | * Compare each file with every initial directory file. Simplifies the problem by
604 | * kicking out created files.
605 | * Calculate match percentage between files if its changed.
606 | * @param created files considered as created.
607 | * @return List of rewritten objects.
608 | */
609 |
610 | public List GetRewritten(List created)
611 | {
612 | List rewritten = new List();
613 |
614 | foreach (string file in CurrentDir)
615 | {
616 | string filename = Path.GetRelativePath(directory, file);
617 |
618 | if (!created.Contains(filename))
619 | {
620 | // get creation time ticks for current file
621 | long ticks = File.GetCreationTime(file).Ticks;
622 | // find if file exists in initial directory
623 | int initialFileIndex = FindByTicks(ticks);
624 |
625 | // if file has initial content
626 | if (initialFileIndex > -1)
627 | {
628 | // get initial content of file
629 | string initial = File.ReadAllText(initialDir[initialFileIndex]);
630 | // get final content of file
631 | string final = File.ReadAllText(file);
632 | // calculate required steps to for old content to match new content
633 | double match = CalculateSimilarity(initial, final);
634 |
635 | // if less than 100%
636 | if (match < 100)
637 | {
638 | rewritten.Add(
639 | new Rewritten
640 | {
641 | filename = filename,
642 | match = match
643 | });
644 | }
645 | }
646 | }
647 | }
648 | return rewritten;
649 | }
650 |
651 |
652 |
653 | /*
654 | * Find file by its creation time ticks
655 | * @param ticks creation time value.
656 | * @return index of file in directory array.
657 | */
658 |
659 |
660 | public int FindByTicks(long ticks)
661 | {
662 | initialDir = Directory.GetFiles(initialstate, "*", SearchOption.AllDirectories);
663 | return Array.FindIndex(initialDir, filename => File.GetCreationTime(filename).Ticks == ticks);
664 | }
665 | }
666 | }
667 |
--------------------------------------------------------------------------------