Transactional File Manager is a .NET API that supports including file system operations such as file copy, move, delete, append, etc. in a transaction. It's an implementation of System.Transaction.IEnlistmentNotification (works with System.Transactions.TransactionScope).
This library allows you to wrap file system operations in transactions like this:
// Wrap a file copy and a database insert in the same transaction
TxFileManager fileMgr = new TxFileManager();
using (TransactionScope scope1 = new TransactionScope())
// Copy a file
// Insert a database record
- Support the following file operations in transactions:
This started out as a
on Chinh's blog. This library supports any file system and is not a wrapper over Transactional NTFS (see
Feedback is very welcome. Also if you have any suggestions for enhancements or bug reports please use the discussions area. Better yet, join this project and contribute yourself. That's how open source works!
section for a quick tutorial.
This library is also available from NuGet