Play-/Source/ISO9660/PathTableRecord.cpp
2018-04-30 21:01:23 +01:00

42 lines
731 B
C++

#include <stdlib.h>
#include "PathTableRecord.h"
using namespace ISO9660;
CPathTableRecord::CPathTableRecord(Framework::CStream& stream)
{
m_nameLength = stream.Read8();
m_exLength = stream.Read8();
m_location = stream.Read32();
m_parentDir = stream.Read16();
m_directory = stream.ReadString(m_nameLength);
if(m_nameLength & 1)
{
stream.Seek(1, Framework::STREAM_SEEK_CUR);
}
}
CPathTableRecord::~CPathTableRecord()
{
}
uint8 CPathTableRecord::GetNameLength() const
{
return m_nameLength;
}
uint32 CPathTableRecord::GetAddress() const
{
return m_location;
}
uint32 CPathTableRecord::GetParentRecord() const
{
return m_parentDir;
}
const char* CPathTableRecord::GetName() const
{
return m_directory.c_str();
}