File getNextDataDir ( ) { File latest = getLatestDataDir ( ) ; long newID ; if ( latest == null ) { newID = 0 ; } else { newID = Long . parseLong ( latest . getName ( ) . substring ( 4 ) ) + 1 ; } String suffix = String . format ( "%015d" , newID ) ; return new File ( this . rootDir , "data" + suffix ) ; }
Gets the next data directory .