资 源 简 介
The java.io.File class is lacking in helpful features and treats all paths with its name, "File".
Paths provides more a more intuitive API with interfaces:
* Path
* File
* Folder
It provides many helper methods for common tasks, including:
* Creating Input/Output streams
* Searching a directory
Paths specific types improves both compile time and runtime checks.
Also, interfaces enable easy mocking and allow alternative implementations.