File: dirs.h

package info (click to toggle)
reprepro 4.2.0-2squeeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 4,016 kB
  • ctags: 3,674
  • sloc: ansic: 46,905; sh: 13,899; pascal: 160; makefile: 159; python: 138
file content (29 lines) | stat: -rw-r--r-- 950 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef REPREPRO_DIRS_H
#define REPREPRO_DIRS_H

#ifndef REPREPRO_ERROR_H
#warning "What is happening here?"
#include "error.h"
#endif
#ifndef REPREPRO_STRLIST_H
#warning "What is happening here?"
#include "strlist.h"
#endif

/* create a directory, return RET_NOTHING if already existing */
retvalue dirs_create(const char *);
/* create recursively all parent directories before the last '/' */
retvalue dirs_make_parent(const char *filename);
/* create dirname and any '/'-separated part of it */
retvalue dirs_make_recursive(const char *directory);
/* create directory and parents as needed, and save count to remove them later */
retvalue dir_create_needed(const char *directory, int *createddepth);
void dir_remove_new(const char *directory, int created);

/* Behave like dirname(3) */
retvalue dirs_getdirectory(const char *filename,/*@out@*/char **directory);

const char *dirs_basename(const char *filename);

bool isdir(const char *);
#endif