comparison 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
comparison
equal deleted inserted replaced
7611:92d05dd1047f 7612:3ae88e96dde2
250 * @see gaim_home_dir() 250 * @see gaim_home_dir()
251 */ 251 */
252 char *gaim_user_dir(void); 252 char *gaim_user_dir(void);
253 253
254 /** 254 /**
255 * Builds a complete path from the root, making any directories along
256 * the path which do not already exist.
257 *
258 * @param path The path you wish to create. Note that it must start
259 * from the root or this function will fail.
260 *
261 * @param mode Unix-style permissions for this directory.
262 *
263 * @return 0 for success, nonzero on any error.
264 */
265 int gaim_build_dir(char *path, int mode);
266
267 /**
255 * Creates a temporary file and returns a file pointer to it. 268 * Creates a temporary file and returns a file pointer to it.
256 * 269 *
257 * This is like mkstemp(), but returns a file pointer and uses a 270 * This is like mkstemp(), but returns a file pointer and uses a
258 * pre-set template. It uses the semantics of tempnam() for the 271 * pre-set template. It uses the semantics of tempnam() for the
259 * directory to use and allocates the space for the file path. 272 * directory to use and allocates the space for the file path.