- java.lang.Object
-
- java.nio.file.Paths
-
-
方法详细信息
-
get
public static Path get(String first, String... more)
将路径字符串或从路径字符串连接时的字符串序列转换为Path。- 实现要求:
-
此方法仅使用给定参数调用
Path.of(String, String...)。 - 参数
-
first- 路径字符串或路径字符串的初始部分 -
more- 要连接以形成路径字符串的其他字符串 - 结果
-
由此产生的
Path - 异常
-
InvalidPathException- 如果路径字符串无法转换为Path - 另请参见:
-
FileSystem.getPath(java.lang.String, java.lang.String...),Path.of(String,String...)
-
get
public static Path get(URI uri)
将给定的URI转换为Path对象。- 实现要求:
-
此方法仅使用给定参数调用
* Path.of(URI)。 - 参数
-
uri- 要转换的URI - 结果
-
由此产生的
Path - 异常
-
IllegalArgumentException- 如果uri参数的前提条件不成立。 URI的格式是特定于提供者的。 -
FileSystemNotFoundException- 由URI标识的文件系统不存在且无法自动创建,或者未安装由URI的方案组件标识的提供程序 -
SecurityException- 如果安装了安全管理器,它将拒绝访问文件系统的未指定权限 - 另请参见:
-
Path.of(URI)
-
-