CFPropertyListWriteToStream(_:_:_:_:)
Writes the bytes of a property list serialization out to a stream.
Declaration
func CFPropertyListWriteToStream(_ propertyList: CFPropertyList!, _ stream: CFWriteStream!, _ format: CFPropertyListFormat, _ errorString: UnsafeMutablePointer<Unmanaged<CFString>?>!) -> CFIndexParameters
- propertyList:
The property list to write out.
- stream:
The stream to write to. The stream must be opened and configured—this function simply writes bytes to the stream.
- format:
A constant that specifies the format used to write
propertyList. See Cfpropertylistformat for possible values. - errorString:
On return,
NULLif the conversion is successful, otherwise a string that describes the nature of the errors. Error messages are not localized, but may be in the future, so they are not currently suitable for comparison.Pass
NULLif you do not wish to receive an error string. Ownership follows the 20001148 103029.
Return Value
The number of bytes written, or 0 if an error occurred. If 0 is returned, errorString will contain an error message.
Discussion
This function leaves the stream open after reading the content. When reading a property list, this function expects the reading stream to end wherever the writing ended, so that the end of the property list data can be identified.