2007-12-07 00:26:56 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include "PathTableRecord.h"
|
|
|
|
|
|
|
|
using namespace ISO9660;
|
|
|
|
|
2015-05-17 21:47:31 -04:00
|
|
|
CPathTableRecord::CPathTableRecord(Framework::CStream& stream)
|
2007-12-07 00:26:56 +00:00
|
|
|
{
|
2015-05-17 21:47:31 -04:00
|
|
|
m_nameLength = stream.Read8();
|
|
|
|
m_exLength = stream.Read8();
|
|
|
|
m_location = stream.Read32();
|
|
|
|
m_parentDir = stream.Read16();
|
|
|
|
m_directory = stream.ReadString(m_nameLength);
|
2014-07-12 21:59:58 -04:00
|
|
|
|
|
|
|
if(m_nameLength & 1)
|
2007-12-07 00:26:56 +00:00
|
|
|
{
|
2015-05-17 21:47:31 -04:00
|
|
|
stream.Seek(1, Framework::STREAM_SEEK_CUR);
|
2007-12-07 00:26:56 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
CPathTableRecord::~CPathTableRecord()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2008-03-17 19:20:37 +00:00
|
|
|
uint8 CPathTableRecord::GetNameLength() const
|
2007-12-07 00:26:56 +00:00
|
|
|
{
|
2014-07-12 21:59:58 -04:00
|
|
|
return m_nameLength;
|
2007-12-07 00:26:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
uint32 CPathTableRecord::GetAddress() const
|
|
|
|
{
|
2014-07-12 21:59:58 -04:00
|
|
|
return m_location;
|
2007-12-07 00:26:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
uint32 CPathTableRecord::GetParentRecord() const
|
|
|
|
{
|
2014-07-12 21:59:58 -04:00
|
|
|
return m_parentDir;
|
2007-12-07 00:26:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
const char* CPathTableRecord::GetName() const
|
|
|
|
{
|
2014-07-12 21:59:58 -04:00
|
|
|
return m_directory.c_str();
|
2007-12-07 00:26:56 +00:00
|
|
|
}
|