---
title: "init(_:)"
framework: system
role: symbol
role_heading: Initializer
path: "system/filepath/component/init(_:)"
---

# init(_:)

Create a file path component from a string.

## Declaration

```swift
init?(_ string: String)
```

## Discussion

Discussion Returns nil if string is empty, a root, or has more than one component in it.
