Play-/Source/ISO9660/PathTableRecord.cpp

44 lines
738 B
C++
Raw Normal View History

#include <stdlib.h>
#include "PathTableRecord.h"
using namespace ISO9660;
2014-07-12 21:59:58 -04:00
CPathTableRecord::CPathTableRecord(Framework::CStream* stream)
{
2014-07-12 21:59:58 -04:00
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)
{
2014-07-12 21:59:58 -04:00
stream->Seek(1, Framework::STREAM_SEEK_CUR);
}
}
CPathTableRecord::~CPathTableRecord()
{
}
uint8 CPathTableRecord::GetNameLength() const
{
2014-07-12 21:59:58 -04:00
return m_nameLength;
}
uint32 CPathTableRecord::GetAddress() const
{
2014-07-12 21:59:58 -04:00
return m_location;
}
uint32 CPathTableRecord::GetParentRecord() const
{
2014-07-12 21:59:58 -04:00
return m_parentDir;
}
const char* CPathTableRecord::GetName() const
{
2014-07-12 21:59:58 -04:00
return m_directory.c_str();
}