---
title: FilePath.Root
framework: system
role: symbol
role_heading: Structure
path: system/filepath/root-swift.struct
---

# FilePath.Root

Represents a root of a file path.

## Declaration

```swift
struct Root
```

## Overview

Overview On Unix, a root is simply the directory separator /. On Windows, a root contains the entire path prefix up to and including the final separator. Examples: Unix: / Windows: C:\ C: \ \\server\share\ \\?\UNC\server\share\ \\?\Volume{12345678-abcd-1111-2222-123445789abc}\

## Topics

### Initializers

- [init(_:)](system/filepath/root-swift.struct/init(_:).md)
- [init(platformString:)](system/filepath/root-swift.struct/init(platformstring:)-3s0ol.md)
- [init(platformString:)](system/filepath/root-swift.struct/init(platformstring:)-4twb4.md)
- [init(platformString:)](system/filepath/root-swift.struct/init(platformstring:)-5j1fu.md)
- [init(platformString:)](system/filepath/root-swift.struct/init(platformstring:)-8hwtb.md)

### Instance Properties

- [string](system/filepath/root-swift.struct/string.md)

### Instance Methods

- [withPlatformString(_:)](system/filepath/root-swift.struct/withplatformstring(_:).md)

### Default Implementations

- [CustomDebugStringConvertible Implementations](system/filepath/root-swift.struct/customdebugstringconvertible-implementations.md)
- [CustomStringConvertible Implementations](system/filepath/root-swift.struct/customstringconvertible-implementations.md)
- [ExpressibleByStringLiteral Implementations](system/filepath/root-swift.struct/expressiblebystringliteral-implementations.md)

## Relationships

### Conforms To

- [Copyable](swift/copyable.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Decodable](swift/decodable.md)
- [Encodable](swift/encodable.md)
- [Equatable](swift/equatable.md)
- [Escapable](swift/escapable.md)
- [ExpressibleByExtendedGraphemeClusterLiteral](swift/expressiblebyextendedgraphemeclusterliteral.md)
- [ExpressibleByStringLiteral](swift/expressiblebystringliteral.md)
- [ExpressibleByUnicodeScalarLiteral](swift/expressiblebyunicodescalarliteral.md)
- [Hashable](swift/hashable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
