Files
Umbraco-CMS/src/Umbraco.Core/Composing/RuntimeHashPaths.cs

21 lines
760 B
C#
Raw Normal View History

using System.Collections.Generic;
using System.IO;
namespace Umbraco.Core.Composing
{
/// <summary>
/// Paths used to determine the <see cref="IRuntimeHash"/>
/// </summary>
public sealed class RuntimeHashPaths
{
private readonly List<DirectoryInfo> _paths = new List<DirectoryInfo>();
private readonly Dictionary<FileInfo, bool> _files = new Dictionary<FileInfo, bool>();
public void AddFolder(DirectoryInfo pathInfo) => _paths.Add(pathInfo);
public void AddFile(FileInfo fileInfo, bool scanFileContent = false) => _files.Add(fileInfo, scanFileContent);
public IEnumerable<DirectoryInfo> GetFolders() => _paths;
public IReadOnlyDictionary<FileInfo, bool> GetFiles() => _files;
}
}