cctools
Functions
create_dir.h File Reference

Create a new directory recursively. More...

#include <sys/stat.h>

Go to the source code of this file.

Functions

int create_dir (const char *path, mode_t mode)
 Create a new directory recursively. More...
 
int create_dir_parents (const char *path, mode_t mode)
 Create needed parent directories of a file or directory. More...
 

Detailed Description

Create a new directory recursively.

Function Documentation

int create_dir ( const char *  path,
mode_t  mode 
)

Create a new directory recursively.

Parameters
pathThe full path of a directory. It is not necessary for all components of the path to exist.
modeThe desired unix mode bits of the directory and parents.
Returns
One on success, zero on failure.
int create_dir_parents ( const char *  path,
mode_t  mode 
)

Create needed parent directories of a file or directory.

Parameters
pathThe full path of a file or directory.
modeThe desired unix mode bits of the parent directories.
Returns
One on success, zero on failure.