MaterialsOptimizer.TextureFileInfo.Read C# (CSharp) Method

Read() public method

public Read ( BinaryReader R ) : void
R System.IO.BinaryReader
return void
        public void Read( BinaryReader R )
        {
            m_fileName = new FileInfo( R.ReadString() );
            m_timeStamp = DateTime.FromBinary( R.ReadInt64() );
            m_fileType = (FILE_TYPE) R.ReadInt32();
            if ( m_fileType > FILE_TYPE.BIMAGE )
                throw new Exception( "Corrupted image file!" );
            m_width = R.ReadInt32();
            m_height = R.ReadInt32();
            m_couldBeRead = R.ReadBoolean();
            string	errorText = R.ReadString();
            m_error = errorText != string.Empty ? new Exception( errorText ) : null;

            m_usage = FindUsage( m_fileName );	// Attempt to find usage again
        }