September 2019
Intermediate to advanced
816 pages
18h 47m
English
Converting a file path into a String, URI, File, and so on is a common task that can occur in a wide range of applications. Let's consider the following file path:
Path path = Paths.get("/learning/packt", "JavaModernChallenge.pdf");
Now, based on JDK 7 and the NIO.2 API, let's see how we can convert a Path into a String, a URI, an absolute path, a real path, and a file:
// \learning\packt\JavaModernChallenge.pdfString ...