private string GetDownloadFolderPath(string parentFolderPath) { var downloadFolderPath = _ioService.PathCombine(parentFolderPath, "Downloads"); if (!_ioService.DirectoryExists(downloadFolderPath)) { _ioService.CreateDirectory(downloadFolderPath); } return(downloadFolderPath); }
/// <inheritdoc /> protected override void Execute(ApplicationDialogModel?viewModel, object?parameter) { if (!(viewModel?.Name is string applicationName)) { return; } var directoryName = GetLogFolderPath(applicationName); if (!_ioService.DirectoryExists(directoryName)) { _ioService.CreateDirectory(directoryName); } _uriService.OpenUri(directoryName); }
/// <inheritdoc /> protected override bool CanExecute(InstallationResultDialogModel?viewModel, object?parameter) { return(viewModel != null && !String.IsNullOrEmpty(viewModel.LogFolderPath) && _ioService.DirectoryExists(viewModel.LogFolderPath)); }