Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Methods](https://developer.android.com/reference/java/nio/file/Paths#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/java/nio/file/Paths#inhmethods)

# Paths

` public final class Paths `   
` extends https://developer.android.com/reference/java/lang/Object ` ` `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | java.nio.file.Paths |

<br />

*** ** * ** ***

This class consists exclusively of static methods that return a `https://developer.android.com/reference/java/nio/file/Path` by converting a path string or `https://developer.android.com/reference/java/net/URI`.
**See also:**

- `https://developer.android.com/reference/java/nio/file/Path`

## Summary

| ### Public methods ||
|---|---|
| ` static https://developer.android.com/reference/java/nio/file/Path` | ` https://developer.android.com/reference/java/nio/file/Paths#get(java.net.URI)(https://developer.android.com/reference/java/net/URI uri) ` Converts the given URI to a `https://developer.android.com/reference/java/nio/file/Path` object. |
| ` static https://developer.android.com/reference/java/nio/file/Path` | ` https://developer.android.com/reference/java/nio/file/Paths#get(java.lang.String,%20java.lang.String[])(https://developer.android.com/reference/java/lang/String first, https://developer.android.com/reference/java/lang/String more) ` Converts a path string, or a sequence of strings that when joined form a path string, to a `Path`. |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.

## Public methods

### get

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static Path get (URI uri)
```

Converts the given URI to a `https://developer.android.com/reference/java/nio/file/Path` object.

<br />

##### Implementation Requirements:

- This method simply invokes `https://developer.android.com/reference/java/nio/file/Path#of(java.net.URI)` with the given parameter.

| Parameters ||
|---|---|
| `uri` | `URI`: the URI to convert <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/nio/file/Path` | the resulting `Path` <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if preconditions on the `uri` parameter do not hold. The format of the URI is provider specific. |
| `https://developer.android.com/reference/java/lang/SecurityException` | if a security manager is installed and it denies an unspecified permission to access the file system |
| `https://developer.android.com/reference/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 |

**See also:**

- `https://developer.android.com/reference/java/nio/file/Path#of(java.net.URI)`

### get

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static Path get (String first, 
                String... more)
```

Converts a path string, or a sequence of strings that when joined form a path string, to a `Path`.

<br />

##### Implementation Requirements:

- This method simply invokes `https://developer.android.com/reference/java/nio/file/Path#of(java.lang.String,%20java.lang.String[])` with the given parameters.

| Parameters ||
|---|---|
| `first` | `String`: the path string or initial part of the path string <br /> |
| `more` | `String`: additional strings to be joined to form the path string <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/nio/file/Path` | the resulting `Path` <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/nio/file/InvalidPathException` | if the path string cannot be converted to a `Path` |

**See also:**

- `https://developer.android.com/reference/java/nio/file/FileSystem#getPath(java.lang.String,%20java.lang.String[])`
- `https://developer.android.com/reference/java/nio/file/Path#of(java.lang.String,%20java.lang.String[])`