---
title: "toPath"
description: "Converts this list of [PathNode] into a [Path] by adding the appropriate commands to the [target]
path. If [target] is not specified, a new [Path] instance is created. This method returns
[target] or the newly created [Path]."
type: "function"
---

<div class='type'>Function</div>


<a id='references'></a>
<div class='sourceset sourceset-common'>Common</div>


```kotlin
fun List<PathNode>.toPath(target: Path = Path()): Path
```


Converts this list of `PathNode` into a `Path` by adding the appropriate commands to the `target`
path. If `target` is not specified, a new `Path` instance is created. This method returns
`target` or the newly created `Path`.



