mkdir-parents.h revision 6f9560d31a6fffeed234dc3b841169c40db1c5e1
9132f9df4e12ed5293c70957813aa3736444a13cTimo Sirainen/* Create path and all the directories under it if needed. Permissions for
9439bed2f07d6475febd8a247cd2f0990fb32a13Timo Sirainen existing directories isn't changed. Returns 0 if ok. If directory already
d3d769026fae5d21c2d29614d3bc4579e8d79e81Timo Sirainen exists, returns -1 with errno=EXIST. */
e248fe370c4047cee921a91b48edc37944ab0526Timo Sirainenint mkdir_parents(const char *path, mode_t mode);
baebb412a9a5a44b1756e01cfa3b99f5d8a846b6Timo Sirainen/* Like mkdir_parents(), but use the given uid/gid for newly created
e248fe370c4047cee921a91b48edc37944ab0526Timo Sirainen directories. */
b55f914c0ade77252cfd798ea8eb9a84bda56315Timo Sirainenint mkdir_parents_chown(const char *path, mode_t mode, uid_t uid, gid_t gid);