/// <summary>
/// Gets the cluster entry.
/// </summary>
/// <param name="data">The data.</param>
/// <param name="index">The index.</param>
/// <param name="type">The type.</param>
/// <returns></returns>
public static uint GetClusterEntry(byte[] data, uint index, FatType type)
{
BinaryFormat entry = new BinaryFormat(data);
uint cluster = entry.GetUShort(Entry.FirstCluster + (index * Entry.EntrySize));
if (type == FatType.FAT32)
cluster |= ((uint)entry.GetUShort(Entry.EAIndex + (index * Entry.EntrySize))) << 16;
return cluster;
}