public static void Delete(string path) { if (_provider == null) { Directory.Delete(path); } else { _provider.Delete(path); } }
private void DeleteTempExecutionFolder(string tempExecutionFolder) { if (_directoryProvider.DoesDirectoryExists(tempExecutionFolder)) { _directoryProvider.Delete(tempExecutionFolder, true); } }
private void DeleteTempExecutionFolder(string tempExecutionFolder) { if (_directoryProvider.DoesDirectoryExists(tempExecutionFolder)) { try { _directoryProvider.Delete(tempExecutionFolder, true); } catch (UnauthorizedAccessException) { _consoleProvider.Write("The temp execution couldn't be deleted. You should start the agent with Administrative permissions."); } } }