Português (Portuguese)
Appearance
Português (Portuguese)
Appearance
STRUCT
Path Contents
typepathStringcallerPathpath(_:)relativeToCurrentFile(_:callerPath:)relativeToManifest(_:)relativeToRoot(_:)init(stringLiteral:)public struct Path: ExpressibleByStringInterpolation, Codable, Hashable, SendableA path represents to a file, directory, or a group of files represented by a glob expression.
Paths can be relative and absolute. We discourage using absolute paths because they create a dependency with the environment where they are defined.
type public var type: PathTypepathString public var pathString: StringcallerPath public var callerPath: String?path(_:) public static func path(_ path: String) -> SelfDefault PathType is .relativeToManifest
relativeToCurrentFile(_:callerPath:) public static func relativeToCurrentFile(_ pathString: String, callerPath: StaticString = #file) -> PathInitialize a path that is relative to the file that defines the path.
relativeToManifest(_:) public static func relativeToManifest(_ pathString: String) -> PathInitialize a path that is relative to the directory that contains the manifest file being loaded, for example the directory that contains the Project.swift file.
relativeToRoot(_:) public static func relativeToRoot(_ pathString: String) -> PathInitialize a path that is relative to the closest directory that contains a Tuist or a .git directory.
init(stringLiteral:) public init(stringLiteral: String)Initializer uses .relativeToRoot if path starts with // otherwise it is .relativeToManifest by default