示例#1
0
        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;
            }
        }
示例#2
0
        public void OpenFilePathFolder(string filePath)
        {
            if (!string.IsNullOrEmpty(filePath) && Directory.Exists(filePath))
            {
                Process.Start(filePath);
            }
            else
            {
                var ex = new InvalidDirectoryException();

                throw ex;
            }
        }