private void SetDirectoryRecord( UInt64 extentLocation, UInt64 dataLength, BinaryDateRecord date, sbyte timeZone, byte fileFlags, byte[] fileIdentifier ) { if ( m_record == null ) { m_record = new DirectoryRecord(); } m_record.ExtentLocation = extentLocation; m_record.DataLength = dataLength; m_record.Date = date; m_record.TimeZone = timeZone; m_record.FileFlags = fileFlags; m_record.LengthOfFileIdentifier = (byte)fileIdentifier.Length; m_record.FileIdentifier = fileIdentifier; m_record.Length = (byte)( m_record.LengthOfFileIdentifier+33 ); if ( m_record.Length%2 == 1 ) { m_record.Length++; } if ( fileIdentifier.Length > 255 || m_record.LengthOfFileIdentifier+33 > 255 ) { throw new Exception( "Depasire!" ); } if ( m_volumeDescriptorType == VolumeType.Suplementary && ( ( fileFlags & 2 ) == 0 || fileIdentifier.Length != 1 || fileIdentifier[0] > 1 ) ) { m_volumeDescriptorType = VolumeType.Primary; this.VolumeDescriptorType = VolumeType.Suplementary; } }
private void SetVolumeDescriptor( byte[] systemId, byte[] volumeId, UInt64 volumeSpaceSize, UInt64 pathTableSize, UInt32 typeLPathTable, UInt32 typeMPathTable, DirectoryRecord rootDirRecord, byte[] volumeSetId, byte[] publisherId, byte[] preparerId, byte[] applicationId, byte[] copyrightFileId, byte[] abstractFileId, byte[] bibliographicFieldId, AsciiDateRecord creationDate, AsciiDateRecord modificationDate, AsciiDateRecord expirationDate, AsciiDateRecord effectiveDate ) { if ( m_volumeDescriptor == null ) { m_volumeDescriptor = new VolumeDescriptor(); } volumeSetId.CopyTo( m_volumeDescriptor.VolumeSetId, 0 ); publisherId.CopyTo( m_volumeDescriptor.PublisherId, 0 ); preparerId.CopyTo( m_volumeDescriptor.PreparerId, 0 ); applicationId.CopyTo( m_volumeDescriptor.ApplicationId, 0 ); copyrightFileId.CopyTo( m_volumeDescriptor.CopyrightFileId, 0 ); abstractFileId.CopyTo( m_volumeDescriptor.AbstractFileId, 0 ); bibliographicFieldId.CopyTo( m_volumeDescriptor.BibliographicFileId, 0 ); this.SetVolumeDescriptor( systemId, volumeId, volumeSpaceSize, pathTableSize, typeLPathTable, typeMPathTable, rootDirRecord, creationDate, modificationDate, expirationDate, effectiveDate ); }
public DirectoryRecordWrapper( DirectoryRecord directoryRecord ) { m_record = directoryRecord; m_date = new DateWrapper( directoryRecord.Date ); }
private void SetVolumeDescriptor( byte[] systemId, byte[] volumeId, UInt64 volumeSpaceSize, UInt64 pathTableSize, UInt32 typeLPathTable, UInt32 typeMPathTable, DirectoryRecord rootDirRecord, AsciiDateRecord creationDate, AsciiDateRecord modificationDate, AsciiDateRecord expirationDate, AsciiDateRecord effectiveDate ) { if ( m_volumeDescriptor == null ) { m_volumeDescriptor = new VolumeDescriptor(); } m_volumeDescriptor.VolumeDescType = (byte)m_volumeDescriptorType; systemId.CopyTo( m_volumeDescriptor.SystemId, 0 ); volumeId.CopyTo( m_volumeDescriptor.VolumeId, 0 ); m_volumeDescriptor.VolumeSpaceSize = volumeSpaceSize; m_volumeDescriptor.PathTableSize = pathTableSize; m_volumeDescriptor.TypeLPathTable = typeLPathTable; m_volumeDescriptor.TypeMPathTable = typeMPathTable; m_volumeDescriptor.RootDirRecord = rootDirRecord; m_rootDirRecord = new DirectoryRecordWrapper( rootDirRecord ); m_volumeDescriptor.CreationDate = creationDate; m_creationDate = new DateWrapper( creationDate ); m_volumeDescriptor.ModificationDate = modificationDate; m_modificationDate = new DateWrapper( modificationDate ); m_volumeDescriptor.ExpirationDate = expirationDate; m_expirationDate = new DateWrapper( expirationDate ); m_volumeDescriptor.EffectiveDate = effectiveDate; m_effectiveDate = new DateWrapper( effectiveDate ); }