Path in Java

with Java 7+ :
Path path  = FileSystems.getDefault().getPath(".", "tweet.txt");
To make the migration from earlier Java version easier, the File class has a new method toPath() that allows you to transform File to Path :
Path path  = new File("index.html").toPath();


Popular posts from this blog

Check MySQL query history from command line