view src/lib/mkdir-parents.h @ 8590:b9faf4db2a9f HEAD

Updated copyright notices to include year 2009.
author Timo Sirainen <tss@iki.fi>
date Tue, 06 Jan 2009 09:25:38 -0500
parents ed12eee73357
children 3870069faea3
line wrap: on
line source

#ifndef MKDIR_PARENTS_H
#define MKDIR_PARENTS_H

/* Create path and all the directories under it if needed. Permissions for
   existing directories isn't changed. Returns 0 if ok. If directory already
   exists, returns -1 with errno=EXIST. */
int mkdir_parents(const char *path, mode_t mode);

/* Like mkdir_parents(), but use the given uid/gid for newly created
   directories. */
int mkdir_parents_chown(const char *path, mode_t mode, uid_t uid, gid_t gid);

#endif