# FilePath APIs are too safe

**URL:** <https://forums.swift.org/t/filepath-apis-are-too-safe/58801>\
**Category:** System\
**Created:** [July 9, 2022, 8:09pm UTC](https://forums.swift.org/t/filepath-apis-are-too-safe/58801 "2022-07-09T20:09:42Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Hacksaw](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/hacksaw/32/32775_2.png) [@Hacksaw](https://forums.swift.org/u/Hacksaw)\
**Post date:** [July 11, 2022, 7:27pm UTC](https://forums.swift.org/t/filepath-apis-are-too-safe/58801/5 "2022-07-11T19:27:22Z")

</div>

> [@taylorswift](#):
>
> why is it we can append a raw `String` to a `FilePath` non-optionally, but we can only append a `FilePath.Component` optionally?

Is that true? I can do this:

```swift
import System
var p = FilePath("/var")
let f = FilePath.Component("run")
p.append(f)
print(p) // /var/run

```

This is swift 5.6.1

---

_[View the full topic](https://forums.swift.org/t/filepath-apis-are-too-safe/58801)._
