libplist  2.7.0
API Documentation - Return to Homepage

◆ plist_read_from_file()

PLIST_API plist_err_t plist_read_from_file ( const char *  filename,
plist_t plist,
plist_format_t format 
)

Import the plist_t structure directly from file.

This function will look at the first bytes of the file data to determine if it contains a binary, JSON, OpenStep, or XML plist and tries to parse the data in the appropriate format. Uses plist_from_memory() internally.

Parameters
filenameThe name of the file to parse.
plistA pointer to the imported plist.
formatIf non-NULL, the plist_format_t value pointed to will be set to the parsed format.
Returns
PLIST_ERR_SUCCESS on success or a plist_err_t on failure