Reduce boilerplate for directory checks

This commit is contained in:
Matt Nadareski
2021-03-23 13:35:12 -07:00
parent aa83896963
commit f9d6fce3bd
45 changed files with 102 additions and 138 deletions

View File

@@ -21,7 +21,7 @@ namespace BurnOutSharp.ProtectionType
}
/// <inheritdoc/>
public string CheckDirectoryPath(string path, IEnumerable<string> files)
public List<string> CheckDirectoryPath(string path, IEnumerable<string> files)
{
// TODO: Verify if these are OR or AND
var matchers = new List<PathMatchSet>
@@ -31,8 +31,7 @@ namespace BurnOutSharp.ProtectionType
new PathMatchSet(new PathMatch("SafeLock.128", useEndsWith: true), "SafeLock"),
};
var matches = MatchUtil.GetAllMatches(files, matchers, any: true);
return string.Join(", ", matches);
return MatchUtil.GetAllMatches(files, matchers, any: true);
}
/// <inheritdoc/>