18 #include <sys/types.h> 23 static char *rfind(
char *
string,
char c);
24 static int make_parent_dir(
char *
path,
int mode);
25 static int make_dir(
const char *
path,
int mode);
44 if (make_parent_dir(path2, mode) !=
DB_OK)
48 return make_dir(path, mode);
54 static int make_dir(
const char *
path,
int mode)
68 static int make_parent_dir(
char *
path,
int mode)
73 slash = rfind(
path,
'/');
78 if (access(
path, 0) == 0) {
81 else if (make_parent_dir(
path, mode) !=
DB_OK) {
96 static char *rfind(
char *
string,
char c)
int db_isdir(const char *)
Test if path is a directory.
void db_syserror(const char *)
Report system error.
int db_driver_mkdir(const char *path, int mode, int parentdirs)
Create db directory.
int G_mkdir(const char *)
Creates a new directory.