2019-09-27 23:52:24 -07:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.IO;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
|
|
|
|
|
|
namespace BurnOutSharp.ProtectionType
|
|
|
|
|
|
{
|
2021-02-26 00:32:09 -08:00
|
|
|
|
public class Bitpool : IPathCheck
|
2019-09-27 23:52:24 -07:00
|
|
|
|
{
|
2021-02-26 00:32:09 -08:00
|
|
|
|
/// <inheritdoc/>
|
|
|
|
|
|
public string CheckPath(string path, IEnumerable<string> files, bool isDirectory)
|
2019-09-27 23:52:24 -07:00
|
|
|
|
{
|
|
|
|
|
|
if (isDirectory)
|
|
|
|
|
|
{
|
2020-02-20 14:23:39 -08:00
|
|
|
|
if (files.Any(f => Path.GetFileName(f).Equals("bitpool.rsc", StringComparison.OrdinalIgnoreCase)))
|
2019-09-27 23:52:24 -07:00
|
|
|
|
return "Bitpool";
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
if (Path.GetFileName(path).Equals("bitpool.rsc", StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
|
return "Bitpool";
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|