Static Methodswift-package-manager 6.0.1PackageDescription
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
static func process(String, localization: Localization?
) -> Resource Applies a platform-specific rules to the resource at the given path.
enum Localization
Defines the explicit type of localization for resources.
Other members in extension
Type members
static func embedInCode(String
) -> Resource Applies the embed rule to a resource at the given path.