namespace Cleanuparr.Infrastructure.Features.Files; public interface IHardLinkFileService { /// /// Populates the inode counts for Unix and the file index counts for Windows. /// Needs to be called before to populate the inode counts. /// /// The root directory where to search for hardlinks. void PopulateFileCounts(string directoryPath); /// /// Populates the inode counts for Unix and the file index counts for Windows from multiple directories. /// /// The root directories where to search for hardlinks. void PopulateFileCounts(IEnumerable directoryPaths); /// /// Get the hardlink count of a file. /// /// File path. /// Whether to ignore hardlinks found in the same root dir. /// -1 on error, 0 if there are no hardlinks and 1 otherwise. long GetHardLinkCount(string filePath, bool ignoreRootDir); }