I'm using transactional NTFS wrapper that is available on msdn here to support atomic transactions of file system operations, the available example only shows how to work with transactedFiles but I need also to create, move and copy transacted Directories, I don't know how to use TransactedDirectory Class, can you please help? I tried this code but it doesn't seem to be correct:
if (Transaction.Current == null)
{
throw new Exception("Must be within a transaction scope");
}
using (TransactionScope folderTransaction = new TransactionScope(Transaction.Current))
{
TransactedDirectory.StartTxFResource("D:\\New");
folderTransaction.Complete();
TransactedDirectory.StopTxFResource("D:\\New");
}
it gives an error "access denied, the folder is being used by another process".