public override void WriteBytes(byte[] buffer, int offset)
 {
     FileTimeHelper.WriteSetFileTime(buffer, offset + 0, CreationTime);
     FileTimeHelper.WriteSetFileTime(buffer, offset + 8, LastAccessTime);
     FileTimeHelper.WriteSetFileTime(buffer, offset + 16, LastWriteTime);
     FileTimeHelper.WriteSetFileTime(buffer, offset + 24, ChangeTime);
     LittleEndianWriter.WriteUInt32(buffer, offset + 32, (uint)FileAttributes);
     LittleEndianWriter.WriteUInt32(buffer, offset + 36, Reserved);
 }
 public FileBasicInformation(byte[] buffer, int offset)
 {
     CreationTime   = FileTimeHelper.ReadSetFileTime(buffer, offset + 0);
     LastAccessTime = FileTimeHelper.ReadSetFileTime(buffer, offset + 8);
     LastWriteTime  = FileTimeHelper.ReadSetFileTime(buffer, offset + 16);
     ChangeTime     = FileTimeHelper.ReadSetFileTime(buffer, offset + 24);
     FileAttributes = (FileAttributes)LittleEndianConverter.ToUInt32(buffer, offset + 32);
     Reserved       = LittleEndianConverter.ToUInt32(buffer, offset + 36);
 }
 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);
 }
 public FileNetworkOpenInformation(byte[] buffer, int offset)
 {
     CreationTime   = FileTimeHelper.ReadNullableFileTime(buffer, offset + 0);
     LastAccessTime = FileTimeHelper.ReadNullableFileTime(buffer, offset + 8);
     LastWriteTime  = FileTimeHelper.ReadNullableFileTime(buffer, offset + 16);
     ChangeTime     = FileTimeHelper.ReadNullableFileTime(buffer, offset + 24);
     AllocationSize = LittleEndianConverter.ToInt64(buffer, offset + 32);
     EndOfFile      = LittleEndianConverter.ToInt64(buffer, offset + 40);
     FileAttributes = (FileAttributes)LittleEndianConverter.ToUInt32(buffer, offset + 48);
     Reserved       = LittleEndianConverter.ToUInt32(buffer, offset + 52);
 }
 public FileFsVolumeInformation(byte[] buffer, int offset)
 {
     VolumeCreationTime = FileTimeHelper.ReadNullableFileTime(buffer, offset + 0);
     VolumeSerialNumber = LittleEndianConverter.ToUInt32(buffer, offset + 8);
     VolumeLabelLength  = LittleEndianConverter.ToUInt32(buffer, offset + 12);
     SupportsObjects    = Convert.ToBoolean(ByteReader.ReadByte(buffer, offset + 16));
     Reserved           = ByteReader.ReadByte(buffer, offset + 17);
     if (VolumeLabelLength > 0)
     {
         VolumeLabel = ByteReader.ReadUTF16String(buffer, offset + 18, (int)VolumeLabelLength / 2);
     }
 }