---
title: lastComponent
framework: swift-package-manager
role: symbol
role_heading: Instance Property
path: swift-package-manager/documentation/packageplugin/path/lastcomponent
---

# lastComponent

The last path component (including any extension).

## Declaration

```swift
var lastComponent: String { get }
```
