libplist  2.7.0
API Documentation - Return to Homepage

◆ plist_write_to_file()

PLIST_API plist_err_t plist_write_to_file ( plist_t  plist,
const char *  filename,
plist_format_t  format,
plist_write_options_t  options 
)

Write the plist_t structure to a file at given path using the given format and options.

Parameters
plistThe input plist structure
filenameThe file name of the file to write to. Existing files will be overwritten.
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
Use plist_mem_free() to free the allocated memory.