dirs.h 871 Bytes
Newer Older
Bernhard Link's avatar
Bernhard Link committed
1 2
#ifndef REPREPRO_DIRS_H
#define REPREPRO_DIRS_H
Bernhard Link's avatar
Bernhard Link committed
3

Bernhard Link's avatar
Bernhard Link committed
4
#ifndef REPREPRO_ERROR_H
5 6 7
#warning "What is happening here?"
#include "error.h"
#endif
Bernhard Link's avatar
Bernhard Link committed
8
#ifndef REPREPRO_STRLIST_H
9 10 11
#warning "What is happening here?"
#include "strlist.h"
#endif
Bernhard Link's avatar
Bernhard Link committed
12

13 14
/* create a directory, return RET_NOTHING if already existing */
retvalue dirs_create(const char *);
Bernhard Link's avatar
Bernhard Link committed
15
/* create recursively all parent directories before the last '/' */
16
retvalue dirs_make_parent(const char *);
Bernhard Link's avatar
Bernhard Link committed
17
/* create dirname and any '/'-separated part of it */
18
retvalue dirs_make_recursive(const char *);
19
/* create directory and parents as needed, and save count to remove them later */
20 21
retvalue dir_create_needed(const char *, int *);
void dir_remove_new(const char *, int);
Bernhard Link's avatar
Bernhard Link committed
22

23
/* Behave like dirname(3) */
24
retvalue dirs_getdirectory(const char *, /*@out@*/char **);
25

26
const char *dirs_basename(const char *);
27 28

bool isdir(const char *);
Bernhard Link's avatar
Bernhard Link committed
29
#endif