Beispiel #1
0
CoderList FileStorage::GetFileCoders(const FileEntry& file) const
{
	StringRef ext = Path::GetExtension(file.Name());
	const CoderList* coders = GetCoderRule(ext);
	if (coders != nullptr)
	{
		return *coders;
	}
	return Coders();
}
Beispiel #2
0
bool FileMapTagItem::RemoveOrderItems(const FileEntry& fileEntry)
{
	FileId fileId = FileId::ParseFrom(fileEntry.Name());
	FileMapNameItem* nameItem=mItems.GetOptional(fileId.Name, nullptr);
	if (nameItem->RemoveOrderItems(fileEntry))
	{
		if (!nameItem->IsEmpty())
		{
			mItems.RemoveKey(fileId.Name);
			delete nameItem;
		}
		return true;
	}

	return false;
}