---
title: path
framework: packagedescription
role: symbol
role_heading: Instance Property
path: packagedescription/target/path
---

# path

The path of the target, relative to the package root.

## Declaration

```swift
final var path: String?
```

## Discussion

Discussion If the path is nil, Swift Package Manager looks for a target’s source files at predefined search paths and in a subdirectory with the target’s name. The predefined search paths are the following directories under the package root: Sources, Source, src, and srcs for regular targets Tests, Sources, Source, src, and srcs for test targets For example, Swift Package Manager looks for source files inside the [PackageRoot]/Sources/[TargetName] directory. Don’t escape the package root; that is, values like ../Foo or /Foo are invalid.

## See Also

### Configuring File Locations

- [exclude](packagedescription/target/exclude.md)
- [sources](packagedescription/target/sources.md)
- [resources](packagedescription/target/resources.md)
- [Resource](packagedescription/resource.md)
- [publicHeadersPath](packagedescription/target/publicheaderspath.md)
