是否存在Paths.get("")、Paths.get(".")和new File(".").toPath()可能有不同结果的情况?
发布于 2015-03-17 14:26:20
Paths.get("")给出表示空路径的路径,Paths.get("").toString()返回空字符串。
Paths.get(".")给出表示当前目录的路径,Paths.get(".").toString()给出字符串"."
因此,如果生成路径的字符串表示,Paths.get("")和Paths.get(".") 会导致不同的结果()。
https://stackoverflow.com/questions/28249461
复制相似问题