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

# init(stringLiteral:)

Create a file path component from a string literal.

## Declaration

```swift
init(stringLiteral: String)
```

## Discussion

Discussion Precondition: stringLiteral is non-empty, is not a root, and has only one component in it.
