Beispiel #1
0
 public override void WriteBytes(byte[] buffer, int offset)
 {
     VolumeLabelLength = (uint)(VolumeLabel.Length * 2);
     FileTimeHelper.WriteFileTime(buffer, offset + 0, VolumeCreationTime);
     LittleEndianWriter.WriteUInt32(buffer, offset + 8, VolumeSerialNumber);
     LittleEndianWriter.WriteUInt32(buffer, offset + 12, VolumeLabelLength);
     ByteWriter.WriteByte(buffer, offset + 16, Convert.ToByte(SupportsObjects));
     ByteWriter.WriteByte(buffer, offset + 17, Reserved);
     ByteWriter.WriteUTF16String(buffer, offset + 18, VolumeLabel);
 }
 public override void WriteBytes(byte[] buffer, int offset)
 {
     FileTimeHelper.WriteFileTime(buffer, offset + 0, CreationTime);
     FileTimeHelper.WriteFileTime(buffer, offset + 8, LastAccessTime);
     FileTimeHelper.WriteFileTime(buffer, offset + 16, LastWriteTime);
     FileTimeHelper.WriteFileTime(buffer, offset + 24, ChangeTime);
     LittleEndianWriter.WriteInt64(buffer, offset + 32, AllocationSize);
     LittleEndianWriter.WriteInt64(buffer, offset + 40, EndOfFile);
     LittleEndianWriter.WriteUInt32(buffer, offset + 48, (uint)FileAttributes);
     LittleEndianWriter.WriteUInt32(buffer, offset + 52, Reserved);
 }