1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace PDF_Office.Helper
- {
- public class CacheFilePath
- {
- private static readonly CacheFilePath instance = new CacheFilePath();
- private CacheFilePath()
- {
- }
- public static CacheFilePath Instance => instance;
- public string CustomStampPath
- {
- get
- {
- try
- {
- string Path = System.IO.Path.Combine(App.CurrentPath, "CustomStamp");
- System.IO.DirectoryInfo directoryInfo = System.IO.Directory.CreateDirectory(Path);
- if (directoryInfo.Exists
- &&(directoryInfo.Attributes & System.IO.FileAttributes.ReadOnly) != System.IO.FileAttributes.ReadOnly
- &&(directoryInfo.Attributes & System.IO.FileAttributes.Hidden) != System.IO.FileAttributes.Hidden
- )
- {
- return Path;
- }
- else
- {
- return "";
- }
- }
- catch (Exception)
- {
- return "";
- }
- }
- }
- }
- }
|