| 2988 | } |
| 2989 | |
| 2990 | IndexedIOPtr StreamIndexedIO::subdirectory( const IndexedIO::EntryID &name, IndexedIO::MissingBehaviour missingBehaviour ) |
| 2991 | { |
| 2992 | assert( m_node ); |
| 2993 | DirectoryNode *childNode = m_node->directoryChild( name ); |
| 2994 | if ( !childNode ) |
| 2995 | { |
| 2996 | if ( missingBehaviour == IndexedIO::CreateIfMissing ) |
| 2997 | { |
| 2998 | writable( name ); |
| 2999 | childNode = m_node->addChild( name ); |
| 3000 | if ( !childNode ) |
| 3001 | { |
| 3002 | throw IOException( "StreamIndexedIO: Could not insert child '" + name.value() + "'" ); |
| 3003 | } |
| 3004 | } |
| 3005 | else if ( missingBehaviour == IndexedIO::NullIfMissing ) |
| 3006 | { |
| 3007 | return nullptr; |
| 3008 | } |
| 3009 | else |
| 3010 | { |
| 3011 | throw IOException( "StreamIndexedIO: Could not find child '" + name.value() + "'" ); |
| 3012 | } |
| 3013 | } |
| 3014 | StreamIndexedIO::Node *newNode = new StreamIndexedIO::Node( m_node->m_idx.get(), childNode ); |
| 3015 | return duplicate(*newNode); |
| 3016 | } |
| 3017 | |
| 3018 | ConstIndexedIOPtr StreamIndexedIO::subdirectory( const IndexedIO::EntryID &name, IndexedIO::MissingBehaviour missingBehaviour ) const |
| 3019 | { |
no test coverage detected