- 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();