MCPcopy Create free account
hub / github.com/ImageEngine/cortex / subdirectory

Method subdirectory

src/IECore/StreamIndexedIO.cpp:2990–3016  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2988}
2989
2990IndexedIOPtr 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
3018ConstIndexedIOPtr StreamIndexedIO::subdirectory( const IndexedIO::EntryID &name, IndexedIO::MissingBehaviour missingBehaviour ) const
3019{

Callers 15

loadSceneIntoCacheMethod · 0.80
loadAttributesMethod · 0.80
loadPrimVarsMethod · 0.80
testRmStressMethod · 0.80
testResetRootMethod · 0.80
testMkdirMethod · 0.80
testChdirMethod · 0.80
testLsMethod · 0.80
testRmMethod · 0.80
testRmStressMethod · 0.80

Calls 5

IOExceptionFunction · 0.85
directoryChildMethod · 0.80
addChildMethod · 0.45
valueMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected