SquidStd.Vfs.Database
0.28.0
dotnet add package SquidStd.Vfs.Database --version 0.28.0
NuGet\Install-Package SquidStd.Vfs.Database -Version 0.28.0
<PackageReference Include="SquidStd.Vfs.Database" Version="0.28.0" />
<PackageVersion Include="SquidStd.Vfs.Database" Version="0.28.0" />
<PackageReference Include="SquidStd.Vfs.Database" />
paket add SquidStd.Vfs.Database --version 0.28.0
#r "nuget: SquidStd.Vfs.Database, 0.28.0"
#:package SquidStd.Vfs.Database@0.28.0
#addin nuget:?package=SquidStd.Vfs.Database&version=0.28.0
#tool nuget:?package=SquidStd.Vfs.Database&version=0.28.0
<h1 align="center">SquidStd.Vfs.Database</h1>
An IVirtualFileSystem that stores files as rows in a relational database via SquidStd.Database / FreeSql.
Each file is a single VfsFileEntity row keyed by path; writes are upserts (last write wins, no concurrent
write safety guarantee).
Install
dotnet add package SquidStd.Vfs.Database
Usage
Register SquidStd.Database first (it provides IDataAccess<>), then add the VFS backend:
using DryIoc;
using SquidStd.Vfs.Abstractions.Interfaces;
using SquidStd.Vfs.Database.Extensions;
// SquidStd.Database must already be registered on the container.
container.RegisterDatabaseFileSystem();
var fs = container.Resolve<IVirtualFileSystem>();
await fs.WriteAllBytesAsync("config/settings.json", payload);
byte[]? data = await fs.ReadAllBytesAsync("config/settings.json");
await foreach (var entry in fs.ListAsync("config"))
Console.WriteLine($"{entry.Path} ({entry.Size} bytes)");
The VfsFileEntity table is created automatically by FreeSql on first access (sync-structure mode).
Single-writer assumption - upsert operations are not serialised across concurrent writers. Use this backend in single-process scenarios or where last-write-wins is acceptable.
Key types
| Type | Purpose |
|---|---|
RegisterDatabaseFileSystemExtensions |
RegisterDatabaseFileSystem() DryIoc registration. |
DatabaseFileSystem |
FreeSql-backed IVirtualFileSystem. |
VfsFileEntity |
ORM entity: Path (PK), Content (blob), UpdatedAt. |
Related
- Tutorial: Virtual filesystem
SquidStd.Vfs- core backends and decoratorsSquidStd.Database- required database module
License
MIT - part of SquidStd.
| 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
- FreeSql (>= 3.5.310)
- SquidStd.Core (>= 0.28.0)
- SquidStd.Database.Abstractions (>= 0.28.0)
- SquidStd.Vfs.Abstractions (>= 0.28.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 |
|---|---|---|
| 0.28.0 | 44 | 7/8/2026 |
| 0.27.0 | 46 | 7/7/2026 |
| 0.26.0 | 37 | 7/7/2026 |
| 0.25.0 | 95 | 7/6/2026 |
| 0.24.1 | 101 | 7/6/2026 |
| 0.24.0 | 92 | 7/6/2026 |
| 0.23.0 | 92 | 7/4/2026 |
| 0.22.0 | 90 | 7/4/2026 |
| 0.21.0 | 90 | 7/3/2026 |
| 0.20.0 | 90 | 7/3/2026 |
| 0.19.0 | 95 | 7/3/2026 |
| 0.18.0 | 92 | 7/3/2026 |
| 0.17.0 | 97 | 7/3/2026 |
| 0.16.0 | 94 | 7/3/2026 |
| 0.15.0 | 94 | 7/2/2026 |
| 0.14.1 | 90 | 7/2/2026 |
| 0.14.0 | 90 | 7/2/2026 |
| 0.13.0 | 92 | 7/2/2026 |
| 0.12.0 | 93 | 7/2/2026 |
| 0.11.0 | 96 | 7/2/2026 |