public final URI toUri ( URI fileSystemUri , String root , Iterable < String > names , boolean directory ) { String path = toUriPath ( root , names , directory ) ; try { // it should not suck this much to create a new URI that's the same except with a path set =( // need to do it this way for automatic path escaping return new URI ( fileSystemUri . getScheme ( ) , fileSystemUri . getUserInfo ( ) , fileSystemUri . getHost ( ) , fileSystemUri . getPort ( ) , path , null , null ) ; } catch ( URISyntaxException e ) { throw new AssertionError ( e ) ; } }
Creates a URI for the path with the given root and names in the file system with the given URI .