<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "System",
  "identifier" : "/documentation/System/FilePath/append(_:)-7ttzp",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "System"
    ],
    "preciseIdentifier" : "s:6System8FilePathV6appendyySSnF"
  },
  "title" : "append(_:)"
}
-->

# append(_:)

Append the contents of `other`, ignoring any spurious leading separators.

```
mutating func append(_ other: String)
```

## Discussion

A leading separator is spurious if `self` is non-empty.

Example:

```
var path: FilePath = ""
path.append("/var/www/website") // "/var/www/website"
path.append("static/assets") // "/var/www/website/static/assets"
path.append("/main.css") // "/var/www/website/static/assets/main.css"
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)