Beispiel #1
0
void IsoDirectory::Init(const IsoFileDescriptor& directoryEntry)
{
	// parse directory sector
	IsoFile dataStream (internalReader, directoryEntry);

	files.clear();

	uint remainingSize = directoryEntry.size;

	u8 b[257];

	while(remainingSize>=4) // hm hack :P
	{
		b[0] = dataStream.read<u8>();

		if(b[0]==0)
		{
			break; // or continue?
		}

		remainingSize -= b[0];

		dataStream.read(b+1, b[0]-1);

		files.push_back(IsoFileDescriptor(b, b[0]));
	}

	b[0] = 0;
}
Beispiel #2
0
void ElfObject::readIso(IsoFile file)
{
	int rsize = file.read(data.GetPtr(), data.GetSizeInBytes());
	if (rsize < data.GetSizeInBytes()) throw Exception::EndOfStream(filename);
}