List version controlled file paths. Git and SVN are supported.
Unit tests are the main target of this project.
- Add NuGet package
dotnet add package Versioning.Utils
- Get file paths
string[] paths = await VersioningUtils.GetVersionedFiles();
Console.WriteLine(String.Join("\n", paths));
/*
C:/projects/VersioningUtils/.editorconfig
C:/projects/VersioningUtils/.github/workflows/ci.yml
C:/projects/VersioningUtils/.gitignore
C:/projects/VersioningUtils/LICENSE.txt
...
*/
- .NET Core 3.0 or later (.NET Standard 2.1)
- Tested environment
- Windows 10 + Visual Studio 2019
- Windows 10 + VS Code
- GitHub actions (Ubuntu-latest)
- Tested environment
- Supported version control sysytem environment
- git
- git command
- GitHub Desktop
- svn
- svn command
- TortoiseSVN requires an installation option "command line client tools".
- svn command
- git
- Limitation
- With svn
- This package ignores files where the path has non ASCII letters.
- This package ignores missing files in your local workspace.
- With svn
-
VersioningUtils.FindTrojanLetters(...)
- This utility function detects Unicode characters that your IDE does not show you.
// Sample unit test code: var exts = new string[]{".cs"}; var list = await VersioningUtils.FindTrojanLetters(exts); Assert.True(0 == list.Count(), $"Trojan source(s) detected.\n{String.Join("\n----\n", list)}");