mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-07-30 12:43:06 +00:00
Separate protections into their own classes
This commit is contained in:
26
BurnOutSharp/ProtectionType/Bitpool.cs
Normal file
26
BurnOutSharp/ProtectionType/Bitpool.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
namespace BurnOutSharp.ProtectionType
|
||||
{
|
||||
public class Bitpool
|
||||
{
|
||||
public static string CheckPath(string path, IEnumerable<string> files, bool isDirectory)
|
||||
{
|
||||
if (isDirectory)
|
||||
{
|
||||
if (files.Count(f => Path.GetFileName(f).Equals("bitpool.rsc", StringComparison.OrdinalIgnoreCase)) > 0)
|
||||
return "Bitpool";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Path.GetFileName(path).Equals("bitpool.rsc", StringComparison.OrdinalIgnoreCase))
|
||||
return "Bitpool";
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user