ChinhDo.Transactions.TxFileManager.TxEnlistment.Delete C# (CSharp) Method

Delete() public method

Deletes the specified file or directory. An exception is not thrown if the file does not exist.
public Delete ( string path ) : void
path string The file to be deleted.
return void
			public void Delete(string path)
			{
				var r = new RollbackFile(path);
				try
				{
					File.Delete(path);
				}
				catch (Exception e)
				{
					r.CleanUp();
					throw new Exception(e.Message, e);
				}
				if (_tx != null)
				{
					_journal.Add(r);
					Enlist();
				}
			}