public static Boolean IsBFS(string drive) { Boolean test = true; //Check if first Partition is BFS byte[] first; first = llda.ReadSector(drive, 0, 4096 * 5); if (first != null) { gpt = GPT.FromSectors(first); test = test && (gpt.gptPartitionTable.partitions[0].BFSParitionType == new Guid("53525542-4354-494F-4E46-494C45535953")); //Check if BFSTOC v1 exists bfsTOC = BFSTOC.FromSector(llda.ReadSector(drive, 5, 4096)); byte[] version = Encoding.ASCII.GetBytes("BFS1"); test = test && bfsTOC.version.SequenceEqual(version); return(test); } return(false); }
public static void LoadBFSTOC(string drive) { bfsTOC = BFSTOC.FromSector(llda.ReadSector(drive, 5, 4096)); }