mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-09-22 14:54:56 +00:00
Implement BD+ detection (#24)
This commit is contained in:
27
BurnOutSharp/ProtectionType/BD+.cs
Normal file
27
BurnOutSharp/ProtectionType/BD+.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
namespace BurnOutSharp.ProtectionType
|
||||
{
|
||||
public class BDPlus : IPathCheck
|
||||
{
|
||||
// TODO: Figure out how to detect version
|
||||
/// <inheritdoc/>
|
||||
public string CheckPath(string path, bool isDirectory, IEnumerable<string> files)
|
||||
{
|
||||
// Multiple .svm files should always be present, but as far as I can tell, 00000.svm is the first one made and should be present no matter what.
|
||||
if (isDirectory)
|
||||
{
|
||||
if (files.Any(f => f.Contains(Path.Combine("BDSVM", "00000.svm")))
|
||||
&& files.Any(f => f.Contains(Path.Combine("BDSVM", "BACKUP", "00000.svm"))))
|
||||
{
|
||||
return "BD+";
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user