diff --git a/Sources/TSCBasic/Path.swift b/Sources/TSCBasic/Path.swift index 7d450cc4..1f64ca2a 100644 --- a/Sources/TSCBasic/Path.swift +++ b/Sources/TSCBasic/Path.swift @@ -76,6 +76,7 @@ public protocol Path: Hashable, Codable, CustomStringConvertible { var components: [String] { get } } +/// Default implementations of some protocol stubs. extension Path { public var pathString: String { if filepath.string.isEmpty { @@ -145,7 +146,10 @@ extension Path { } return components } +} +/// Default implementation of `CustomStringConvertible`. +extension Path { public var description: String { return pathString } @@ -156,6 +160,7 @@ extension Path { } } +/// Default implementation of `Codable`. extension Path { public func encode(to encoder: Encoder) throws { var container = encoder.singleValueContainer()