diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2007-06-22 04:35:12 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2007-06-22 04:35:12 +0000 |
commit | a1bc8231365c9bdea0d3881a8cd056f6abecb07b (patch) | |
tree | 45f02eef0ac120e193459b71f73a7b62b7db8784 /include/asterisk/utils.h | |
parent | 0b98b2a659dca13c8b7fe4a6682ede8e2ae110b7 (diff) |
Issue 9990 - New API ast_mkdir, which creates parent directories as necessary (and is faster than an outcall to mkdir -p)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@71040 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/utils.h')
-rw-r--r-- | include/asterisk/utils.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/asterisk/utils.h b/include/asterisk/utils.h index 779db5ea0..76f90c7b0 100644 --- a/include/asterisk/utils.h +++ b/include/asterisk/utils.h @@ -593,6 +593,16 @@ int _ast_vasprintf(char **ret, const char *file, int lineno, const char *func, c */ void ast_enable_packet_fragmentation(int sock); +/*! + \brief Recursively create directory path + \param path The directory path to create + \param mode The permissions with which to try to create the directory + \return 0 on success or an error code otherwise + + Creates a directory path, creating parent directories as needed. + */ +int ast_mkdir(const char *path, int mode); + #define ARRAY_LEN(a) (sizeof(a) / sizeof(a[0])) #include "asterisk/strings.h" |