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

Method find

src/IECore/SearchPath.cpp:106–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106boost::filesystem::path SearchPath::find( const boost::filesystem::path &file ) const
107{
108 // if it's a full path then there's no need to do any searching
109 if( file.is_absolute() )
110 {
111 if( exists( file ) )
112 {
113 return file;
114 }
115 else
116 {
117 return "";
118 }
119 }
120
121 // do some searching
122 for( list<path>::const_iterator it = paths.begin(); it!=paths.end(); it++ )
123 {
124 path f = *it / file;
125 if( exists( f ) )
126 {
127 return f;
128 }
129 }
130 return "";
131}

Callers 15

testFindMethod · 0.95
readShaderNetworkWalkFunction · 0.45
createShaderPrimFunction · 0.45
nameToUSDMethod · 0.45
nameFromUSDMethod · 0.45
findUSDAttributeMethod · 0.45
cortexAttributeNameMethod · 0.45
WriteToFileMethod · 0.45
fromUSDMethod · 0.45
canReadObjectMethod · 0.45
readObjectMethod · 0.45

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by 1

testMethod · 0.36