- Path 通过 normalize toRealPath 来消除 “.” "…"toRealPath 与toAbsolutePath normalize 类似
Path curDir = Paths.get(".");
//Files 确认Path是否存在
boolean b = Files.exists(curDir,new LinkOption[]{LinkOption.NOFOLLOW_LINKS});
//消除". or.."
curDir.toAbsolutePath().normalize();
System.out.println(curDir.toRealPath());
//path 可以互相转化 file
File file = curDir.toFile();
Path path = file.toPath();
//Path 转化 uri
URI uri = curDir.toUri();