private void EnsureFileIsNew(string path)
 {
     if (_fileSystemAccess.Exists(path))
     {
         _fileSystemAccess.Delete(path);
     }
 }
コード例 #2
0
 private void DeleteFile(string filePath)
 {
     Policy.Handle <IOException>()
     .Or <UnauthorizedAccessException>()
     .WaitAndRetry(5, count => TimeSpan.FromMilliseconds(count * 100))
     .Execute(() => _fileSystemAccess.Delete(filePath));
 }