EQXMedia.TxFileSystem
2.1.1
Install-Package EQXMedia.TxFileSystem -Version 2.1.1
dotnet add package EQXMedia.TxFileSystem --version 2.1.1
<PackageReference Include="EQXMedia.TxFileSystem" Version="2.1.1" />
paket add EQXMedia.TxFileSystem --version 2.1.1
#r "nuget: EQXMedia.TxFileSystem, 2.1.1"
// Install EQXMedia.TxFileSystem as a Cake Addin
#addin nuget:?package=EQXMedia.TxFileSystem&version=2.1.1
// Install EQXMedia.TxFileSystem as a Cake Tool
#tool nuget:?package=EQXMedia.TxFileSystem&version=2.1.1
EQXMedia.TxFileSystem
EQXMedia.TxFileSystem
is a transactional file system wrapper using the .NET file system abstraction from System.IO.Abstractions
.
This file system wrapper supports transactional operations on:
- Files,
- Directories,
- File streams.
About the Project
Project Development
This library has been designed and implemented by Jarno Kamminga for EQX Media B.V., and published as an OpenSource project on GitHub.
Project Website
The project has a website of its own which can be found at https://txfilesystem.io/.
Library Documentation
The documentation of the library can be found at https://txfilesystem.io/docs/.
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 2.0.2
.NET CLI
$ dotnet add package EQXMedia.TxFileSystem --version 2.0.2
Package Reference
<PackageReference Include="EQXMedia.TxFileSystem" Version="2.0.2" />
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());
txFileSystem.File.Create(@"C:\Users\JohnDoe\Documents\example.txt");
throw new Exception("Error occurs after creating the file. Resulting in the creation to be rolled back.");
transactionScope.Complete();
Product | Versions |
---|---|
.NET | net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows |
.NET Core | netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1 |
.NET Standard | netstandard2.0 netstandard2.1 |
.NET Framework | net461 net462 net463 net47 net471 net472 net48 |
MonoAndroid | monoandroid |
MonoMac | monomac |
MonoTouch | monotouch |
Tizen | tizen40 tizen60 |
Xamarin.iOS | xamarinios |
Xamarin.Mac | xamarinmac |
Xamarin.TVOS | xamarintvos |
Xamarin.WatchOS | xamarinwatchos |
-
.NETFramework 4.6.1
- System.IO.Abstractions (>= 13.2.9)
-
.NETStandard 2.0
- System.IO.Abstractions (>= 13.2.9)
- System.Memory (>= 4.5.4)
-
.NETStandard 2.1
- System.IO.Abstractions (>= 13.2.9)
-
net5.0
- System.IO.Abstractions (>= 13.2.9)
- System.IO.FileSystem (>= 4.3.0)
- System.IO.FileSystem.AccessControl (>= 5.0.0)
-
net6.0
- System.IO.Abstractions (>= 13.2.9)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version 2.1.1
-------------
● Providing a System.IO.Abstractions file system wrapper.
● Support transactional operations on:
○ Files,
○ Directories,
○ File Streams.
● Can be used to wrap any files system that implements the IFileSystem interface.
● TxFileSystem class is now a IFileSystem implementation too.
● Exposing the TxFileSystem on property instances too to maintain data integrity.
● Plain proxy functionality for all remaining parts of the System.IO.Abstractions interfaces.
● Added support for IntelliSense.
● Added support for Symbol files (.pdb).
● Added testing helpers to aid projects in Unit Testing.
● Added documentation for all supported framework versions:
○ Generated HTML Documentation.
○ Generated Windows Help File.
● Now supports multiple framework versions:
○ .NET Framework 4.6.1,
○ .NET Standard 2.0,
○ .NET Standard 2.1,
○ .NET 5.0,
○ .NET 6.0.
● Unit Testing all supported framework versions.
● Fully covered by Unit Tests (100% code coverage).