コード例 #1
0
        public static FATEntry Create(ushort data, int cnumb)
        {
            FATEntry ret = new FATEntry();

            ret.FATEnt = data;
            ret.cNum   = cnumb;
            return(ret);
        }
コード例 #2
0
        public FATEntry GetFATEntry(int cluster)
        {
            //Lets find the particular cluster in FAT1
            //Fat 1 is easy to find.
            //Actual byte position formula:
            //(FatXLocation*BPB.BytesPerSector) + (cluster*2)
            byte[] fatEnt = new byte[2];

            FATStream.Read(fatEnt, 0, 2);
            ushort data = 0;

            unchecked
            {
                data = (ushort)(fatEnt[0] + (fatEnt[1] << 8));
            }
            return(FATEntry.Create(data, cluster));
        }
コード例 #3
0
 public void SetFATEntry(int cluster, FATEntry f)
 {
     SetFATEntry(cluster, f.Value);
 }