Mercurial > pidgin.yaz
diff src/util.h @ 7612:3ae88e96dde2
[gaim-migrate @ 8236]
This is an attempt to both fix the directory creation permissions
and simplify the creation of nested directories from within gaim at the
same time. If you need nested directories, simply call gaim_build_dir
with the same arguments you would have given to mkdir and it will
recursively create the tree for you. I spent way too much time on
this.
committer: Tailor Script <tailor@pidgin.im>
author | Ethan Blanton <elb@pidgin.im> |
---|---|
date | Sun, 23 Nov 2003 18:41:11 +0000 |
parents | 54b370f7d9bf |
children | 072feee65244 |
line wrap: on
line diff
--- a/src/util.h Sun Nov 23 18:21:03 2003 +0000 +++ b/src/util.h Sun Nov 23 18:41:11 2003 +0000 @@ -252,6 +252,19 @@ char *gaim_user_dir(void); /** + * Builds a complete path from the root, making any directories along + * the path which do not already exist. + * + * @param path The path you wish to create. Note that it must start + * from the root or this function will fail. + * + * @param mode Unix-style permissions for this directory. + * + * @return 0 for success, nonzero on any error. + */ +int gaim_build_dir(char *path, int mode); + +/** * Creates a temporary file and returns a file pointer to it. * * This is like mkstemp(), but returns a file pointer and uses a