Here you can find the source of createPathRelativizer(Path path, boolean doRelativize)
public static Function<Path, Path> createPathRelativizer(Path path, boolean doRelativize)
//package com.java2s; //License from project: Open Source License import java.nio.file.Path; import java.util.function.Function; public class Main { public static Function<Path, Path> createPathRelativizer(Path path, boolean doRelativize) { return (p) -> (doRelativize ? path.relativize(p) : p); } }/*from ww w . j a va 2 s .c o m*/