FileHandleTextStream

public struct FileHandleTextStream : TextOutputStream

A wrapper to convert a FileHandle into a TextOutputStream

  • the underlying handle

    Declaration

    Swift

    public let handle: FileHandle
  • the encoding used to write to the handle

    Declaration

    Swift

    public let encoding: String.Encoding
  • Create a text stream that writes to the filehandle using the specified encoding

    Declaration

    Swift

    public init(_ handle: FileHandle, encoding: String.Encoding = .utf8)
  • Declaration

    Swift

    public func write(_ string: String)