Added in API level 26
    Paths
class Paths
| kotlin.Any | |
| ↳ | java.nio.file.Paths | 
This class consists exclusively of static methods that return a Path by converting a path string or URI.
Summary
| Public methods | |
|---|---|
| static Path! | Converts a path string, or a sequence of strings that when joined form a path string, to a  | 
| static Path! | Converts the given URI to a  | 
Public methods
get
Added in API level 26
      static fun get(
first: String!,
vararg more: String!
): Path!
Converts a path string, or a sequence of strings that when joined form a path string, to a Path.
| Parameters | |
|---|---|
| first | String!: the path string or initial part of the path string | 
| more | String!: additional strings to be joined to form the path string | 
| Return | |
|---|---|
| Path! | the resulting Path | 
| Exceptions | |
|---|---|
| java.nio.file.InvalidPathException | if the path string cannot be converted to a Path | 
get
Added in API level 26
      static fun get(uri: URI!): Path!
Converts the given URI to a Path object.
| Parameters | |
|---|---|
| uri | URI!: the URI to convert | 
| Return | |
|---|---|
| Path! | the resulting Path | 
| Exceptions | |
|---|---|
| java.lang.IllegalArgumentException | if preconditions on the uriparameter do not hold. The format of the URI is provider specific. | 
| java.nio.file.FileSystemNotFoundException | The file system, identified by the URI, does not exist and cannot be created automatically, or the provider identified by the URI's scheme component is not installed | 
| java.lang.SecurityException | if a security manager is installed and it denies an unspecified permission to access the file system | 
See Also
