I was learning java nio package and I realized there are lots of methods already provided by File which nio.Files is providing again by using Path class. Like that few more
Almost every method in java.io.File has issues that cannot be fixed for compatibility reasons, the most obvious is that the methods return a boolean when they fail. These issues plus the desire to support pluggable file systems and many other things necessitated the development of a completely new file system API so this is why java.nio.File was created.