public List < DirectoryBuilder > constructChildren ( IndexReader indexReader , CollectionUpdateType forceCollection ) throws IOException { if ( childrenConstructed ) return children ; if ( index != null && forceCollection == CollectionUpdateType . nocheck ) { // use index if it exists constructChildrenFromIndex ( indexReader , false ) ; } else { scanForChildren ( ) ; } //once we have found children, we know that this is a time partition partitionStatus = ( children . size ( ) > 0 ) ? PartitionStatus . isDirectoryPartition : PartitionStatus . isLeaf ; childrenConstructed = true ; // otherwise we are good return children ; }
Find all children directories . Does not recurse . We separate this from the constructor so it can be done on demand Public for debugging .