libplist  2.7.0
API Documentation - Return to Homepage

◆ plist_write_to_stream()

PLIST_API plist_err_t plist_write_to_stream ( plist_t  plist,
FILE *  stream,
plist_format_t  format,
plist_write_options_t  options 
)

Write the plist_t structure to a FILE* stream using the given format and options.

Parameters
plistThe input plist structure
streamA writeable FILE* stream that the data will be written to.
formatA plist_format_t value that specifies the output format to use.
optionsOne or more bitwise ORed values of plist_write_options_t.
Returns
PLIST_ERR_SUCCESS on success or a plist_err_t on failure.
Note
While this function allows all formats to be written to the given stream, only the formats PLIST_FORMAT_PRINT, PLIST_FORMAT_LIMD, and PLIST_FORMAT_PLUTIL (basically all output-only formats) are directly and efficiently written to the stream; the other formats are written to a memory buffer first.