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

# init(root:_:)

Create a file path from an optional root and a slice of another path’s components.

## Declaration

```swift
init(root: FilePath.Root?, _ components: FilePath.ComponentView.SubSequence)
```
