copy(_:)

    Applies the copy rule to a resource at the given path.

    Resource.swift:95
    SwiftPM
    5.3+
    static func copy(_ path: String) -> Resource

    Parameters

    path

    The path for a resource.

    Returns

    A Resource instance.

    If possible, use process(_:localization:) and automatically apply optimizations to resources.

    If your resources must remain untouched or must retain a specific folder structure, use the copy rule. It copies resources at the given path, as is, to the top level in the package’s resource bundle. If the given path represents a directory, Swift Package Manager preserves its structure.

    See also

    Other members in extension

    Type members