.NET Transactional File Manager
.NET Transactional File Manager
http://transactionalfilemgr.codeplex.com/
对文件系统操作,比如copy, move, delete ,加入事务支持。
Project Description 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 fileMgr.Copy(srcFileName, destFileName); // Insert a database record dbMgr.ExecuteNonQuery(insertSql); scope1.Complete(); }
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。