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); }
public static FileInfo LocalSiteImageRssFile(this UserSettings settings) { var directory = settings.LocalSiteImageDirectory(); return(new FileInfo($"{Path.Combine(directory.FullName, "ImageRss")}.xml")); }