mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 11:25:35 +00:00
res_stir_shaken: refactor utility function
Refactors temp file utility function into file.c. ASTERISK-29809 #close Change-Id: Ife478708c8f2b127239cb73c1755ef18c0bf431b
This commit is contained in:
committed by
Kevin Harwell
parent
19481fc1f0
commit
4cb4a3ed01
@@ -146,6 +146,23 @@ int ast_filecopy(const char *oldname, const char *newname, const char *fmt);
|
||||
*/
|
||||
FILE *ast_file_mkftemp(char *template, mode_t mode);
|
||||
|
||||
/*!
|
||||
* \brief Create a temporary file located at path
|
||||
*
|
||||
* \note The directory containing path will be created if it does not exist
|
||||
* \note This function assumes path does not end with a '/'
|
||||
*
|
||||
* \param path The directory path to create the file in
|
||||
* \param filename Function allocates memory and stores full filename (including path) here
|
||||
* \param template_name mkstemp template to use. Must end with XXXXXX.
|
||||
*
|
||||
* \note filename will need to be freed with ast_free if this function succeeds
|
||||
*
|
||||
* \retval -1 on failure
|
||||
* \return file descriptor on success
|
||||
*/
|
||||
int ast_file_fdtemp(const char *path, char **filename, const char *template_name);
|
||||
|
||||
/*!
|
||||
* \brief Callback called for each file found when reading directories
|
||||
* \param dir_name the name of the directory
|
||||
|
Reference in New Issue
Block a user