using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace PDF_Office.Helper { 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 ""; } } } } }