LTRData.DiscUtils.ReFs
1.0.92
dotnet add package LTRData.DiscUtils.ReFs --version 1.0.92
NuGet\Install-Package LTRData.DiscUtils.ReFs -Version 1.0.92
<PackageReference Include="LTRData.DiscUtils.ReFs" Version="1.0.92" />
<PackageVersion Include="LTRData.DiscUtils.ReFs" Version="1.0.92" />
<PackageReference Include="LTRData.DiscUtils.ReFs" />
paket add LTRData.DiscUtils.ReFs --version 1.0.92
#r "nuget: LTRData.DiscUtils.ReFs, 1.0.92"
#:package LTRData.DiscUtils.ReFs@1.0.92
#addin nuget:?package=LTRData.DiscUtils.ReFs&version=1.0.92
#tool nuget:?package=LTRData.DiscUtils.ReFs&version=1.0.92
LTRData.DiscUtils.ReFs
Managed .NET support for reading ReFS 3.x filesystems. Experimental, read-only.
Part of the LTRData DiscUtils fork. Package IDs use LTRData.DiscUtils; C# namespaces remain DiscUtils.
Capabilities
| Capability | Support |
|---|---|
| Detect ReFS boot sector, generic discovery | Yes |
| Read files and directories (lazy enumeration, upcase-table name matching) | Yes |
Alternate data streams (IFileSystemWithAltStreams) |
Yes |
Windows metadata (IWindowsFileSystem): security descriptors, reparse points, hard-link counts, standard information, file ids |
Yes, read-only; setters throw NotSupportedException |
| Extended attributes | Yes (ReFsFileSystem.GetExtendedAttributes) |
| Metadata page checksums (CRC32C, CRC-64, SHA-256, XXH64) and integrity-stream data checksums (including XXH64) | Yes, verified on read; a mismatch raises an error |
| Volume compression (LZ4, LZ4 HC, Zstandard) | Yes; Zstandard is unavailable on net46 |
| Windows Data Deduplication | Yes: optimized files read from the chunk store through LTRData.DiscUtils.DeduplicationRole, chunks checked against their hashes (ReFsFileSystemOptions.ReadDeduplicatedFiles, on by default) |
| EFS-encrypted files | Listed; reading their data throws NotSupportedException (no decryption) |
| Redo-log replay of a dirty volume | Experimental and opt-in (ReFsFileSystemOptions.ReplayLog), in memory only; logs up to Windows build 29683 |
Structure validation (ReFsFileSystem.Validate) |
Yes |
Diagnostics: volume and entry details, streams and snapshots (OpenStream), per-file data verification, redo-log scan (GetVolumeDetails, GetEntryDetails, VerifyData, ReadRedoLog) |
Yes, experimental: shapes may change |
| Create a filesystem / modify an existing one | No |
| ReFS 1.x (Server 2012 / 2012 R2) | No: refused on open |
Used and available space (UsedSpace, AvailableSpace) |
Yes, from the volume allocator's summary as of the mounted checkpoint (see the notes below) |
| DOS short names | No: short names are null |
| Symbolic links | Listed as ordinary entries with the ReparsePoint attribute; targets are not followed |
| Allocation extents, cluster map | Not exposed yet |
| Async I/O, thread safety | Synchronous reads; instances are not thread safe |
Clean Windows images of ReFS 3.1, 3.4, 3.5, 3.10 and 3.14 have full logical content comparisons. Cluster sizes (4 or 64 KiB), compression, integrity and replay coverage vary by image. Further versions and feature combinations require independent qualification.
VerifyData reads each stored stream once and counts logical bytes covered by a successful integrity or compressed-chunk checksum. Coverage stops at logical EOF. Overlapping checks cover a byte once. Placeholder or absent digests leave written bytes unchecked unless another checksum covers them. Holes and unwritten allocations are reported separately. For a Windows Data Deduplication file this operation examines the stored stub and its other streams. Reading the reconstructed file checks the chunk store separately when data verification is enabled.
A flagged file with missing or inconsistent reparse metadata refuses logical access. Named data streams remain independently readable. Set ReadDeduplicatedFiles to false for an intentional raw stub read. The mount borrows the backing stream. Dispose open data streams before the mount and close the backing stream last.
To run the Windows fixture comparisons, check out LTRData/Test-Fixtures at the qualified revision, run git lfs pull there and set DISCUTILS_DATASET to the checkout's dataset directory.
Used and available space come from the summary in the root page of the volume allocator (checkpoint root 1):
AvailableSpacedoes not subtract Windows' runtime reserve ("Total Reserved" infsutil fsinfo refsinfo), which is not stored on the volume, so it exceeds the free space Windows reports by that amount. Used plus available matches Windows' used + free + reserved on the test images.- The figures are those of the mounted checkpoint. On a volume with an unreplayed redo log they can trail Windows' by a few dozen clusters,
and
ReplayLogdoes not update them. - Compressed containers count their stored (packed) clusters.
- A malformed summary makes both properties throw; reading files is not affected.
Registration
DiscUtils.ReFs.Formats.Register();
Each registration call covers only its own assembly. Direct use of ReFsFileSystem needs no registration.
Example
using System.IO;
using DiscUtils.ReFs;
// The stream starts at the ReFS volume, not at a partitioned disk.
using var fs = new ReFsFileSystem(volumeStream);
foreach (var file in fs.Root.GetFiles())
Console.WriteLine(file.FullName);
using var data = fs.OpenFile(@"folder\file.txt", FileMode.Open, FileAccess.Read);
// A volume that was not cleanly dismounted: apply the redo log in memory (experimental).
using var dirty = new ReFsFileSystem(volumeStream, new ReFsFileSystemOptions { ReplayLog = true });
Provenance
The code is an independent implementation written for this project. It contains no source code from other projects and no Microsoft code.
Microsoft does not publish the ReFS on-disk format. The format knowledge comes from these sources:
- Public documentation: the ReFS documentation of the forefst project, credited in the source comments where it was used.
- Microsoft's published specifications: reparse points, file attributes and security descriptors ([MS-FSCC], [MS-DTYP]).
- Published formats and standard algorithms: LZ4 and Zstandard for volume compression, CRC32C, CRC-64, SHA-256 and XXH64 for checksums.
- Observation: volumes were created and changed by several Windows versions, and their structures were examined. The reader's output was compared with what Windows reports for the same volumes.
- Interoperability analysis: where these sources left gaps, the behaviour of Windows' ReFS driver was studied only as far as needed to read volumes it writes. No driver code, function names or addresses are included.
Data Deduplication support comes from LTRData.DiscUtils.DeduplicationRole; its README describes its own sources.
Command-line access
The experimental DiscUtilsCli utility can inspect volumes and exercise these readers. Its host extraction requirements and development status are documented in the utility README. ReFS mount and replay behavior are governed by the library options described above.
| Product | Versions 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 is compatible. 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 is compatible. 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 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. |
| .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 is compatible. |
| .NET Framework | net46 is compatible. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 is compatible. 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. |
-
.NETFramework 4.6
- LTRData.DiscUtils.Core (>= 1.0.92)
- LTRData.DiscUtils.DeduplicationRole (>= 1.0.92)
-
.NETFramework 4.8
- LTRData.DiscUtils.Core (>= 1.0.92)
- LTRData.DiscUtils.DeduplicationRole (>= 1.0.92)
- Microsoft.Bcl.HashCode (>= 6.0.0)
- ZstdSharp.Port (>= 0.9.1)
-
.NETStandard 2.0
- LTRData.DiscUtils.Core (>= 1.0.92)
- LTRData.DiscUtils.DeduplicationRole (>= 1.0.92)
- Microsoft.Bcl.HashCode (>= 6.0.0)
- ZstdSharp.Port (>= 0.9.1)
-
.NETStandard 2.1
- LTRData.DiscUtils.Core (>= 1.0.92)
- LTRData.DiscUtils.DeduplicationRole (>= 1.0.92)
- ZstdSharp.Port (>= 0.9.1)
-
net10.0
- LTRData.DiscUtils.Core (>= 1.0.92)
- LTRData.DiscUtils.DeduplicationRole (>= 1.0.92)
- ZstdSharp.Port (>= 0.9.1)
-
net11.0
- LTRData.DiscUtils.Core (>= 1.0.92)
- LTRData.DiscUtils.DeduplicationRole (>= 1.0.92)
- ZstdSharp.Port (>= 0.9.1)
-
net8.0
- LTRData.DiscUtils.Core (>= 1.0.92)
- LTRData.DiscUtils.DeduplicationRole (>= 1.0.92)
- ZstdSharp.Port (>= 0.9.1)
-
net9.0
- LTRData.DiscUtils.Core (>= 1.0.92)
- LTRData.DiscUtils.DeduplicationRole (>= 1.0.92)
- ZstdSharp.Port (>= 0.9.1)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on LTRData.DiscUtils.ReFs:
| Package | Downloads |
|---|---|
|
LTRData.DiscUtils.FileSystems
DiscUtils meta-package for filesystem readers, supported filesystem writers and virtual filesystem abstractions. |
|
|
LTRData.DiscUtils
Broad DiscUtils meta-package for managed .NET disk images, filesystems, storage protocols and related storage formats. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.92 | 0 | 12/5/2026 |