コード例 #1
0
        public static DirectoryInfo LocalSiteImageContentDirectory(this UserSettings settings, ImageContent content,
                                                                   bool createDirectoryIfNotFound = true)
        {
            var contentDirectory = new DirectoryInfo(Path.Combine(settings.LocalSiteImageDirectory().FullName,
                                                                  content.Folder, content.Slug));

            if (contentDirectory.Exists || !createDirectoryIfNotFound)
            {
                return(contentDirectory);
            }

            contentDirectory.Create();
            contentDirectory.Refresh();

            return(contentDirectory);
        }
コード例 #2
0
        public static FileInfo LocalSiteImageRssFile(this UserSettings settings)
        {
            var directory = settings.LocalSiteImageDirectory();

            return(new FileInfo($"{Path.Combine(directory.FullName, "ImageRss")}.xml"));
        }