18 #include <sys/types.h>
22 static char *rfind(
char *
string,
char c);
23 static int make_parent_dir(
char *
path,
int mode);
24 static int make_dir(
const char *
path,
int mode);
42 if (make_parent_dir(path2, mode) !=
DB_OK)
46 return make_dir(
path, mode);
51 static int make_dir(
const char *
path,
int mode
UNUSED)
64 static int make_parent_dir(
char *
path,
int mode)
69 slash = rfind(
path,
'/');
74 if (access(
path, 0) == 0) {
77 else if (make_parent_dir(
path, mode) !=
DB_OK) {
91 static char *rfind(
char *
string,
char c)
int db_driver_mkdir(const char *path, int mode, int parentdirs)
Create db directory.
int db_isdir(const char *)
Test if path is a directory.
void db_syserror(const char *)
Report system error.
int G_mkdir(const char *)
Creates a new directory.
#define UNUSED
A macro for an attribute, if attached to a variable, indicating that the variable is not used.