path

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

    Target.swift:89
    var path: String?

    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

    Other members in extension

    Types

    Type members

    Show obsolete interfaces (11)

    Hide obsolete interfaces

    Show system interfaces (1)

    Hide system interfaces

    Instance members