Contents

init(toFileAtPath:append:)

Returns an initialized output stream for writing to a specified file.

Declaration

convenience init?(toFileAtPath path: String, append shouldAppend: Bool)

Parameters

  • path:

    The path to the file the output stream will write to.

  • shouldAppend:

    True if newly written data should be appended to any existing file contents, otherwise False.

Return Value

An initialized output stream that can write to path.

Discussion

The stream must be opened before it can be used.

See Also

Creating Streams