Sparkdo.VirtualFileSystem.Abstractions 2.0.0-preview.1

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

Sparkdo.VirtualFileSystem.Abstractions

Sparkdo.VirtualFileSystem.Abstractions 定义 VFS 的 Manifest 声明与主读取契约。

职责

  • 通过 UseVirtualFileSystem(...) 声明 Sparkdo.VirtualFileSystem resource target。
  • 定义 IVirtualFileProvider 的文件、目录、存在性和列表查询。
  • 提供 VirtualFileVirtualDirectoryVirtualFileInfoVirtualFileSearchOption
  • VirtualFileSystemCapability.Id 暴露稳定 capability id。

非职责

  • 不解析 package/generated graph。
  • 不读取 embedded、physical 或 package asset 内容。
  • 不创建 DI service、runtime provider 或 Microsoft.Extensions.FileProviders.IFileProvider bridge。
  • 不执行 Manifest lowering 或 Hosting 启动。

关键入口

API 用途
IResourceManifestBuilder.UseVirtualFileSystem() 声明 VFS target、支持的 source kind 和所需 graph proof。
IVirtualFileProvider.GetFileAsync(...) 获取虚拟文件。
GetDirectoryAsync(...) 获取虚拟目录。
GetFilesAsync(...) 按目录列出文件。
ExistsAsync(...) 检查虚拟路径。

依赖

项目面向 netstandard2.0,依赖 Sparkdo.ManifestSystem.Threading.Tasks.Extensions

使用

manifest.ConfigureResources(static resources =>
{
    resources.UseVirtualFileSystem();
});
var file = await provider.GetFileAsync("static/site.css", cancellationToken);
if (file is not null)
{
    await using var stream = await file.OpenReadAsync(cancellationToken);
}

UseVirtualFileSystem() 只声明契约;source composition 与 provider materialization 属于 Sparkdo.VirtualFileSystem

验证

dotnet test src/virtual-file-system/Sparkdo.VirtualFileSystem.slnx --no-restore -p:UseSharedCompilation=false -nr:false -m:1
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Sparkdo.VirtualFileSystem.Abstractions:

Package Downloads
Sparkdo.Localization

Sparkdo Localization 的 VFS JSON runtime、文化回退与 package manifest。

Sparkdo.VirtualFileSystem

用于物化 Sparkdo 应用与包资产的虚拟文件系统运行时。

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0-preview.2 50 7/20/2026
2.0.0-preview.1 52 7/18/2026
1.0.4-preview.3 479 6/8/2026
1.0.4-preview.2 465 6/7/2026
1.0.4-preview.1 434 6/7/2026
1.0.3 1,060 6/6/2026
1.0.3-preview.1 457 5/17/2026
1.0.2 830 4/27/2026
1.0.2-preview.5 173 4/15/2026
1.0.2-preview.4 176 2/8/2026
1.0.2-preview.3 178 2/1/2026
1.0.2-preview.2 205 1/31/2026
1.0.2-preview.1 221 12/4/2025
1.0.1 2,600 11/27/2025
1.0.0 2,478 11/25/2025
1.0.0-preview.5 164 10/24/2025