using System.IO;
namespace NugetForUnity.Helper
{
///
/// Provides methods for working with symbol files.
///
internal static class PortableSymbolFileHelper
{
///
/// Determines whether the specified PDB file is a portable symbol file.
///
/// The path to the PDB file.
///
/// true if the specified PDB file is a portable symbol file; otherwise, false.
///
public static bool IsPortableSymbolFile(string filePath)
{
using (var stream = File.OpenRead(filePath))
{
return stream.ReadByte() == 'B' && stream.ReadByte() == 'S' && stream.ReadByte() == 'J' && stream.ReadByte() == 'B';
}
}
}
}