Blitz.Files 1.0.1

dotnet add package Blitz.Files --version 1.0.1                
NuGet\Install-Package Blitz.Files -Version 1.0.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Blitz.Files" Version="1.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Blitz.Files --version 1.0.1                
#r "nuget: Blitz.Files, 1.0.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Blitz.Files as a Cake Addin
#addin nuget:?package=Blitz.Files&version=1.0.1

// Install Blitz.Files as a Cake Tool
#tool nuget:?package=Blitz.Files&version=1.0.1                

Blitz.Files

C# Parallel Persistent File Discovery for Blitz Search

This helps serve slow enumeration of files by keeping track of the results, It also helps to have a Cancellation source to be able to cancel the requests at any time.

It also has a .gitIgnore parser, to help alleviate the results of undesired files when searching for code things.

var searchPath = new SearchPath{ Folder = directory };
var paths = new List<SearchPath>{searchPath};
var discoverer = new FileDiscovery(paths, useGitIgnore:false);
var cancelSource = new CancellationTokenSource();
discoverer.WaitUntilFinished(cancelSource);
files = [..discoverer.EnumerateAllFiles(cancelSource)];
timer.Stop();

Example output ( BlitzFilesConsoleDemo ) on my 14GB collection of repositories (without .gitignore parsing)

Enumerating files with 'Directory.Enumeratefiles
Elapsed time: 455 MS
Total files: 71649
Cold Enumeration of files using FileDiscoverer
Elapsed time: 421 MS
Total files: 71649
Cached Enumeration of files using FileDiscoverer
Elapsed time: 10 MS
Total files: 71649
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Blitz.Files:

Package Downloads
Blitz.Search

File Searching Component for Blitz Search, Deals with Searching AND hosting code for transmitting results to the client, which is currentlly in-process.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 48 11/1/2024
1.0.0 75 10/17/2024

upgrade to Blitz.Interfacing 1.0.1