private bool doesHaveSecondaryFile(int hash, int file) { byte[] block0 = part.Read(0); MemBlocks mb = new MemBlocks(block0); for (int index = 46; index < 2048; index += 9) { if (mb.Read(index, 1)[0] == 0xF0 && BitConverter.ToUInt32(block0, index + 5) == hash) { return(true); } } /*if(BitConverter.ToUInt32(block0, 32) != 0) return doesHaveSecondaryFile(hash, BitConverter.ToInt32(block0, 32); * else */return(false); }
public int sectorOfFile(int hash) { byte[] block0 = part.Read(0); MemBlocks mb = new MemBlocks(block0); for (int index = 46; index < 2048; index += 9) { if (mb.Read(index, 1)[0] == 0xF0 && BitConverter.ToInt32(block0, index + 1) == hash) { return(BitConverter.ToInt32(block0, index + 5)); } } /*if(BitConverter.ToUInt32(block0, 32) != 0) return doesHaveSecondaryFile(hash, BitConverter.ToInt32(block0, 32); * else */ return(0); }