Пример #1
0
 protected void DeleteFile(string path)
 {
     try
     {
         m_IStorage.DeleteFile(path);
         m_Logger.Writeln($"Delete File {path}");
     }
     catch (UnauthorizedAccessException)
     {
         m_Logger.Writeln($"Delete Read only file File {path}");
         m_IStorage.SetFileAttribute(path, FileAttributes.Normal);
         m_IStorage.DeleteFile(path);
     }
     catch (Exception ex)
     {
         m_Logger.Writeln($"**Exception while deleteing file: {path}\n{ex.Message}");
     }
 }