public void SaveFileToDisk(DocumentTemplateModel template) { if (!string.IsNullOrEmpty(template.FilePath)) { File.WriteAllBytes(template.FilePath, Convert.FromBase64String(template.Content)); } else { var ex = new InvalidDirectoryException(); throw ex; } }
public void OpenFilePathFolder(string filePath) { if (!string.IsNullOrEmpty(filePath) && Directory.Exists(filePath)) { Process.Start(filePath); } else { var ex = new InvalidDirectoryException(); throw ex; } }