String

public extension String

Extensions on String that work with Path rather than String or URL

  • Initializes this String with the contents of the provided path.

    Declaration

    Swift

    @inlinable
    init<P>(contentsOf path: P) throws where P : Pathish
  • Declaration

    Swift

    @discardableResult
    @inlinable
    func write<P>(to: P, atomically: Bool = false, encoding: String.Encoding = .utf8) throws -> P where P : Pathish

    Return Value

    to to allow chaining