| 1373 | } |
| 1374 | |
| 1375 | bool StreamIndexedIO::Node::dataChildInfo( const IndexedIO::EntryID &name, Info &info ) const |
| 1376 | { |
| 1377 | Index::MutexLock lock; |
| 1378 | m_idx->lockDirectory( lock, m_node ); |
| 1379 | |
| 1380 | DirectoryNode::ChildMap::const_iterator cit = m_node->findChild( name ); |
| 1381 | if ( cit != m_node->children().end() ) |
| 1382 | { |
| 1383 | NodeBase *p = *cit; |
| 1384 | |
| 1385 | if ( p->nodeType() == NodeBase::Data ) |
| 1386 | { |
| 1387 | DataNode *n = static_cast< DataNode *>( p ); |
| 1388 | info.offset = n->offset(); |
| 1389 | info.size = n->size(); |
| 1390 | info.decompressedSize = n->decompressedSize(); |
| 1391 | info.numCompressedBlocks = n->compressedBlocks(); |
| 1392 | return true; |
| 1393 | } |
| 1394 | else if ( p->nodeType() == NodeBase::SmallData ) |
| 1395 | { |
| 1396 | SmallDataNode *n = static_cast< SmallDataNode *>( p ); |
| 1397 | info.offset = n->offset(); |
| 1398 | info.size = n->size(); |
| 1399 | info.decompressedSize = n->decompressedSize(); |
| 1400 | info.numCompressedBlocks = n->compressedBlocks(); |
| 1401 | return true; |
| 1402 | } |
| 1403 | } |
| 1404 | return false; |
| 1405 | } |
| 1406 | |
| 1407 | DirectoryNode* StreamIndexedIO::Node::addChild( const IndexedIO::EntryID &childName ) |
| 1408 | { |
no test coverage detected