Exemplo n.º 1
0
bool LafsFlat::startDirectory(const DirectoryEntry& dir)
{
	WORD wEntryBuffer = 0x8000; //First bit is set for a directory
	
	//Two entries per directory start of directory
	if(2 + dir.getSize() >= getFreeEntries())
		return false;
	
	m_lafsEntries.push_back(LafsEntry(wEntryBuffer, dir));
	m_lafsEntries.push_back(LafsEntry(wEntryBuffer, dir, true));

	return true;
}
Exemplo n.º 2
0
bool LafsFlat::addJumpDirectory(const DirectoryEntry& dir, const int iNextFlat)
{
	
	WORD wEntryBuffer = 0x8000; //First bit is set for a directory
	
	//Two entries per directory start of directory
	if(m_lafsEntries.size() + 2 + dir.getSize() > LAFS_ENTRIES_PER_FLAT)
		return false;
	
	m_lafsEntries.push_back(LafsEntry(wEntryBuffer, dir));
	m_lafsEntries.push_back(LafsEntry(wEntryBuffer, dir, iNextFlat, true));
	
	return true;
}