---
title: "append(_:)"
framework: system
role: symbol
role_heading: Instance Method
path: "system/filepath/append(_:)-8f41n"
---

# append(_:)

Append a component on to the end of this path.

## Declaration

```swift
mutating func append(_ component: FilePath.Component)
```

## Discussion

Discussion Example: var path: FilePath = "/tmp" let sub: FilePath = "foo/./bar/../baz/." for comp in sub.components.filter({ $0.kind != .currentDirectory }) {   path.append(comp) } // path is "/tmp/foo/bar/../baz"
