示例#1
0
 public void Execute()
 {
     if (Directory.Exists(path))
     {
         var temp = TransactionFileUtils.GetTempFileName(string.Empty);
         TransactionFileUtils.EnsureTempFolderExists();
         MoveDirectory(path, temp);
         backupPath = temp;
     }
 }
示例#2
0
        public override void Execute()
        {
            if (File.Exists(path))
            {
                string temp = TransactionFileUtils.GetTempFileName(Path.GetExtension(path));
                TransactionFileUtils.EnsureTempFolderExists();
                File.Copy(path, temp);
                backupPath = temp;
            }

            File.Delete(path);
        }