Files
BinaryObjectScanner/BurnOutSharp/ProtectionType/FreeLock.cs

29 lines
749 B
C#
Raw Normal View History

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 FreeLock : IPathCheck
{
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)
{
2021-03-19 15:41:49 -07:00
if (files.Any(f => Path.GetFileName(f).Equals("FREELOCK.IMG", StringComparison.OrdinalIgnoreCase)))
return "FreeLock";
return null;
}
/// <inheritdoc/>
public string CheckFilePath(string path)
{
if (Path.GetFileName(path).Equals("FREELOCK.IMG", StringComparison.OrdinalIgnoreCase))
return "FreeLock";
return null;
}
}
}