public PathImpl fsWalk ( String userPath , Map < String , Object > attributes , String path ) { ArrayList < PathImpl > pathList = getMergePaths ( ) ; if ( ! userPath . startsWith ( "/" ) || pathList . size ( ) == 0 ) return new MergePath ( ( MergePath ) _root , userPath , attributes , path ) ; String bestPrefix = null ; for ( int i = 0 ; i < pathList . size ( ) ; i ++ ) { PathImpl subPath = pathList . get ( i ) ; String prefix = subPath . getPath ( ) ; if ( path . startsWith ( prefix ) && ( bestPrefix == null || bestPrefix . length ( ) < prefix . length ( ) ) ) { bestPrefix = prefix ; } } if ( bestPrefix != null ) { path = path . substring ( bestPrefix . length ( ) ) ; if ( ! path . startsWith ( "/" ) ) path = "/" + path ; return new MergePath ( ( MergePath ) _root , userPath , attributes , path ) ; } return pathList . get ( 0 ) . lookup ( userPath , attributes ) ; }
Walking down the path just extends the path . It won t be evaluated until opening .