Jeninnet.FileQuery.Tooling 2.0.0

Requires NuGet 6.0.0 or higher.

dotnet add package Jeninnet.FileQuery.Tooling --version 2.0.0
                    
NuGet\Install-Package Jeninnet.FileQuery.Tooling -Version 2.0.0
                    
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="Jeninnet.FileQuery.Tooling" Version="2.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Jeninnet.FileQuery.Tooling" Version="2.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Jeninnet.FileQuery.Tooling" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Jeninnet.FileQuery.Tooling --version 2.0.0
                    
#r "nuget: Jeninnet.FileQuery.Tooling, 2.0.0"
                    
#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.
#:package Jeninnet.FileQuery.Tooling@2.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Jeninnet.FileQuery.Tooling&version=2.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Jeninnet.FileQuery.Tooling&version=2.0.0
                    
Install as a Cake Tool

Jeninnet.FileQuery.Tooling

Build-tooling SDK for Jeninnet.FileQuery. It exposes the engine's pattern classification, structural validation, and tokenization without executing a query, so build systems, linters, and IDE plugins can reuse the same semantics as the engine.

The package is a stable facade: it returns only SDK-defined models, so the engine internals remain free to change.

Installation

dotnet add package Jeninnet.FileQuery.Tooling

Quick start

using Jeninnet.FileQuery.Tooling;

var inspection = PatternInspector.Inspect("!src/**/*.cs");

Console.WriteLine(inspection.Kind);                 // GitIgnore
Console.WriteLine(inspection.IsNegated);            // True
Console.WriteLine(inspection.SegmentCount);         // 3
Console.WriteLine(inspection.Validation.IsValid);   // True

foreach (var segment in inspection.Segments)
{
    foreach (var token in segment.Tokens)
    {
        Console.WriteLine($"{token.Kind}: {token.Value}");
    }
}

API

Member Result
PatternInspector.Classify(string) PatternKind (GitIgnore, Glob, Regex, or Unknown when malformed)
PatternInspector.Validate(string) PatternValidation (IsValid, Error)
PatternInspector.Inspect(string) PatternInspection using the automatically classified dialect
PatternInspector.Inspect(string, PatternKind) PatternInspection using a forced dialect

PatternInspection exposes the structural flags (IsNegated, IsRootAnchored, IsDirectoryOnly, HasRecursiveWildcard, HasCharacterClass, HasEscapedCharacters, ...), the validation result, and the tokenized segments.

Model Purpose
PatternInspection Complete inspection result
PatternSegmentInfo One slash-separated segment and its tokens
PatternTokenInfo One atomic token (Kind, Value)
PatternTokenKind Literal, Wildcard, RecursiveWildcard, SingleCharacterWildcard, CharacterClass, RegularExpression, EscapedCharacter, Unknown
PatternValidation Structural validation result

Token notes

  • Character classes are rendered back from the parsed elements, e.g. [!a-z0-9] or [[:digit:]].
  • Escaped characters are currently resolved to literal tokens (\* becomes the literal *); use HasEscapedCharacters to detect that escaping was present.
  • A forced Regex dialect expects the r: prefix. Without it the text is tokenized as literals; the command-line tool adds the prefix automatically, this SDK reports the pattern as supplied.

Scope

This package is read-only inspection. Matching files, traversal, and query execution belong to the core engine. The surface is intentionally small; new members are additive and follow SemVer.

License

MIT — see LICENSE.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0 206 11/2/2026

See CHANGELOG.md and Migration.md at https://github.com/TarekNajem04/Jeninnet.FileQuery