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
<PackageReference Include="Jeninnet.FileQuery.Tooling" Version="2.0.0" />
<PackageVersion Include="Jeninnet.FileQuery.Tooling" Version="2.0.0" />
<PackageReference Include="Jeninnet.FileQuery.Tooling" />
paket add Jeninnet.FileQuery.Tooling --version 2.0.0
#r "nuget: Jeninnet.FileQuery.Tooling, 2.0.0"
#:package Jeninnet.FileQuery.Tooling@2.0.0
#addin nuget:?package=Jeninnet.FileQuery.Tooling&version=2.0.0
#tool nuget:?package=Jeninnet.FileQuery.Tooling&version=2.0.0
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*); useHasEscapedCharactersto detect that escaping was present. - A forced
Regexdialect expects ther: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 | Versions 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. |
-
net10.0
- Jeninnet.FileQuery (>= 2.0.0)
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