internal byte[] GetData() { List <byte> xArray = new List <byte>(); xArray.Add(xNLen); xArray.Add((byte)((IsFolder ? 1 : 0) << 4)); xArray.AddRange(Encoding.ASCII.GetBytes(xName)); xArray.AddRange(new byte[0x2A - xName.Length]); xArray.AddRange(BitConv.GetBytes(xStartBlock, true)); xArray.AddRange(BitConv.GetBytes(xSize, true)); xArray.AddRange(BitConv.GetBytes(xT1, true)); xArray.AddRange(BitConv.GetBytes(xT2, true)); xArray.AddRange(BitConv.GetBytes(xT3, true)); return(xArray.ToArray()); }
/// <summary> /// Returns the STFS Descriptor /// </summary> /// <returns></returns> internal byte[] GetData() { byte idx = 1; if (ThisType == STFSType.Type1) { idx = (byte)(TopRecord.Index << 1); } // Returns the Descriptor in a data fashion List <byte> xReturn = new List <byte>(); xReturn.AddRange(new byte[] { 0x24, 0 }); xReturn.Add(idx); xReturn.AddRange(xStruct); xReturn.AddRange(new byte[20]); xReturn.AddRange(BitConv.GetBytes(xBlockCount, true)); xReturn.AddRange(BitConv.GetBytes(TopRecord.BlocksFree, true)); return(xReturn.ToArray()); }