Nullean.Entities.CsCheck.FileSystem 0.1.0-preview.1

This is a prerelease version of Nullean.Entities.CsCheck.FileSystem.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Nullean.Entities.CsCheck.FileSystem --version 0.1.0-preview.1
                    
NuGet\Install-Package Nullean.Entities.CsCheck.FileSystem -Version 0.1.0-preview.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="Nullean.Entities.CsCheck.FileSystem" Version="0.1.0-preview.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Nullean.Entities.CsCheck.FileSystem" Version="0.1.0-preview.1" />
                    
Directory.Packages.props
<PackageReference Include="Nullean.Entities.CsCheck.FileSystem" />
                    
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 Nullean.Entities.CsCheck.FileSystem --version 0.1.0-preview.1
                    
#r "nuget: Nullean.Entities.CsCheck.FileSystem, 0.1.0-preview.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.
#:package Nullean.Entities.CsCheck.FileSystem@0.1.0-preview.1
                    
#: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=Nullean.Entities.CsCheck.FileSystem&version=0.1.0-preview.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Nullean.Entities.CsCheck.FileSystem&version=0.1.0-preview.1&prerelease
                    
Install as a Cake Tool

Nullean.Entities.CsCheck.FileSystem

AutoGen for models that hold the file system. IFileSystem, IFileInfo and IDirectoryInfo have no constructor and what matters is what is on the disk, so they cannot be built by shape. UseFileSystem() gives AutoGen a MockFileSystem per generated value:

record Docset(IFileSystem FileSystem, IDirectoryInfo Root, IFileInfo SourceFile, IReadOnlyList<IFileInfo> Images);

var gen = GenAuto.Of<Docset>(AutoMode.Mixed, o => o.UseFileSystem());
DocsetConstraints.All.Probe(gen);     // a missing file, a symlink, a path outside the root... without writing a file system
DocsetConstraints.All.Laws(valid, counterExamples);

Every file-system member of one value belongs to the same world, so SourceFile, Root and FileSystem agree. Plausible data is files that exist inside the root. Mixed and Adversarial add what the rules about files exist to catch: a missing file, an empty one, a symbolic link, a file below a linked directory, one below a hidden directory, one outside the root, one reached through .., one in a different case, one with the wrong extension (.bin; generated files are otherwise .md, so a rule that expects .png of an image will not hold for plausible data). Worlds are deterministic from the seed, and a shrunk failure prefers the plain existing file.

Boundaries() and Laws() know the file kinds too: pass options: o => o.UseFileSystem() and each kind (a missing file, a symlink, a hidden directory...) is swapped, in the baseline's own file system, into the file members and into one-element lists of them, so Laws finds a counter-example for ImagesExist, ImagesStayInRoot and the rest with none written by hand. (A rule that two others always trip with it, like a missing root and "images stay inside the root", is reported as an overlap.)

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.  net11.0 is compatible. 
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
0.1.1 53 10/20/2026
0.1.0 82 10/20/2026
0.1.0-preview.2 92 10/20/2026
0.1.0-preview.1 46 10/20/2026