NAME
makepath - create intermediate directories for a path

SYNOPSIS
char *makepath(path, refpath, trace, showerrs);
char *path, *refpath;
int trace, showerrs;

DESCRIPTION
Makepath creates any directories missing in path. If refpath is
non-null, then it must have a non-null trailing subpath that is
common to path. The entire path will be created if refpath is
given and refpath is the path of a directory, otherwise only the
components preceding the final component will be created for path.

If trace is non-zero, diagnostics will be printed to stderr. If
showerrs is non-zero error messages will be printed to stderr.

Makepath return 0 if successful, 1 otherwise.

EXAMPLES
makepath("/foo/bar/baz", NULL, 1, 1);

will attempt create "/foo" and "/foo/bar", if they do not exist,
printing out changes as they are made and errors, if they occur.

SEE ALSO
mkdir(2)