libmpm

morphux C package management library
Log | Files | Refs | Submodules | README | LICENSE | git clone https://git.ne02ptzero.me/git/libmpm

commit b5774662aecead422950434300a4bf248872dc0e
parent 5613e27be5c5659c1393933dee4c19b95e352f43
Author: Ne02ptzero <louis@ne02ptzero.me>
Date:   Tue,  9 May 2017 16:32:36 +0200

Add(Packer): Add doxygen documentation to extract functions

Diffstat:
Minc/packer.h | 18++++++++++++++++++
Minc/packer_file.h | 7+++++++
2 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/inc/packer.h b/inc/packer.h @@ -163,6 +163,24 @@ bool packer_read_archive_in_memory(packer_t *ctx); */ bool packer_read_archive_header(packer_t *ctx); +/*! + * \brief Extract an archive in a directory + * + * \param[in] ctx Archive to extract + * \param[in] dir Parent directory to extract to + * \param[out] output_dir Name of the main extracted directory + * + * This function will extract an MPX archive in a designated dir + * It will create a main directory too, with the format NAME-VERSION + * For example, if the call is: + * packer_extract_archive(ctx, "/tmp", &ptr); + * The output directory will be /tmp/NAME-VERSION (Ex: /tmp/test-2.0) + * + * The output_dir parameter is allocated by this function, caller should take + * care of the free + * + * \return true on success, false on failure + */ bool packer_extract_archive(packer_t *ctx, const char *dir, char **output_dir); #endif /* PACKER_H */ diff --git a/inc/packer_file.h b/inc/packer_file.h @@ -94,6 +94,13 @@ bool get_file_information(packer_file_t *file); */ packer_file_t *read_packer_file_from_binary(const char *content, off_t *ctr); +/*! + * \brief Write a file to disk + * + * \param[in] file File to write + * + * \return true on success, false on failure + */ bool packer_file_to_disk(packer_file_t *file); #endif /* PACKER_FILE_H */