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/>
|
2021-03-19 15:41:49 -07:00
|
|
|
|
public string CheckDirectoryPath(string path, IEnumerable<string> files)
|
2019-09-27 23:52:24 -07:00
|
|
|
|
{
|
2021-03-19 15:41:49 -07:00
|
|
|
|
if (files.Any(f => Path.GetFileName(f).Equals("bitpool.rsc", StringComparison.OrdinalIgnoreCase)))
|
|
|
|
|
|
return "Bitpool";
|
2019-09-27 23:52:24 -07:00
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
|
}
|
2021-03-19 15:41:49 -07:00
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
|
|
public string CheckFilePath(string path)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (Path.GetFileName(path).Equals("bitpool.rsc", StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
|
return "Bitpool";
|
|
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
|
}
|
2019-09-27 23:52:24 -07:00
|
|
|
|
}
|
|
|
|
|
|
}
|