EQXMedia.TxFileSystem 1.1.0

Suggested Alternatives

EQXMedia.TxFileSystem 1.1.1

Additional Details

Rollback functionality of File.Move(string sourceFileName, string destFileName, bool overwrite) (>= .NET 5.0) is determined to be broken.

There is a newer version of this package available.
See the version list below for details.
Install-Package EQXMedia.TxFileSystem -Version 1.1.0
dotnet add package EQXMedia.TxFileSystem --version 1.1.0
<PackageReference Include="EQXMedia.TxFileSystem" Version="1.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add EQXMedia.TxFileSystem --version 1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: EQXMedia.TxFileSystem, 1.1.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install EQXMedia.TxFileSystem as a Cake Addin
#addin nuget:?package=EQXMedia.TxFileSystem&version=1.1.0

// Install EQXMedia.TxFileSystem as a Cake Tool
#tool nuget:?package=EQXMedia.TxFileSystem&version=1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.


EQXMedia.TxFileSystem is a transactional filesystem wrapper using the .NET filesystem abstraction from System.IO.Abstractions.

This filesystem wrapper supports transactional operations on:

  • Files,
  • Directories,
  • Filestreams.

NuGet Package

A NuGet package is created of every EQXMedia.TxFileSystem release and can be installed to your .NET project using the NuGet Package Manager or dotnet command.

More information about the NuGet package can be found at NuGet.org: https://www.nuget.org/packages/EQXMedia.TxFileSystem/

Installing the package

Package Manager

PS> Install-Package EQXMedia.TxFileSystem -Version 1.0.0


$ dotnet add package EQXMedia.TxFileSystem --version 1.0.0

Package Reference

<PackageReference Include="EQXMedia.TxFileSystem" Version="1.0.0" />

Code Example

* Because an error occurs inside the transaction scope, the creation of the file will not take place
* (or better said be rolled back):
* txFileSystem.File.Exists(@"C:\Users\JohnDoe\Documents\example.txt");
* Would simply return 'false' after execution of the below code.

using System;
using System.IO.Abstractions;
using System.Transactions;
using EQXMedia.TxFileSystem;
using var transactionScope = TransactionScope();

var txFileSystem = new TxFileSystem(new FileSystem());

throw new Exception("Error occurs after creating the file. Resulting in the creation to be rolled back.");


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.2 95 5/19/2021
2.0.1 136 5/1/2021
2.0.0 120 4/27/2021
1.3.0 90 4/16/2021
1.2.0 74 4/10/2021
1.1.1 87 4/8/2021
1.1.0 428 4/8/2021
1.0.0 78 4/7/2021

Version 1.1.0
* Providing a System.IO.Abstractions filesystem wrapper.
* Can be used to wrap any filesystem that implements the IFileSystem interface.
* Support transactional operations on:
 * Files,
 * Directories,
 * Filestreams.
 * Plain proxy functionality for all remaining parts of the System.IO.Abstractions interfaces.
* Fully covered by Unit Tests (100% code coverage).
* Now supports multiple framework versions.