mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-02-13 05:35:24 +00:00
34 lines
985 B
C#
34 lines
985 B
C#
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
|
|
namespace BurnOutSharp.ProtectionType
|
|
{
|
|
// TODO: Figure out how to use path check framework here
|
|
public class ProtectDVDVideo : IPathCheck
|
|
{
|
|
/// <inheritdoc/>
|
|
public List<string> CheckDirectoryPath(string path, IEnumerable<string> files)
|
|
{
|
|
if (Directory.Exists(Path.Combine(path, "VIDEO_TS")))
|
|
{
|
|
string[] ifofiles = files.Where(s => s.EndsWith(".ifo")).ToArray();
|
|
for (int i = 0; i < ifofiles.Length; i++)
|
|
{
|
|
FileInfo ifofile = new FileInfo(ifofiles[i]);
|
|
if (ifofile.Length == 0)
|
|
return new List<string>() { "Protect DVD-Video" };
|
|
}
|
|
}
|
|
|
|
return null;
|
|
}
|
|
|
|
/// <inheritdoc/>
|
|
public string CheckFilePath(string path)
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
}
|