From db3b96fc0014a5e860df1efc729b38d629662826 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 29 Aug 2003 01:21:11 +0000 Subject: many fixes --cleanup implemented git-svn-id: file:///home/lennart/svn/public/syrep/trunk@13 07ea20a6-d2c5-0310-9e02-9ef735347d72 --- src/util.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src/util.h') diff --git a/src/util.h b/src/util.h index 2aa7215..a44c598 100644 --- a/src/util.h +++ b/src/util.h @@ -24,13 +24,19 @@ #include #include +#ifndef MIN +#define MIN(a,b) ((a)<(b)?(a):(b)) +#endif + void statistics(DB *db); char* normalize_path(char *s); void rotdash(void); -const char* get_attached_filename(const char *path, const char *fn); +void rotdash_hide(void); +const char* get_snapshot_filename(const char *path, const char *fn); int isdirectory(const char *path); int copy_fd(int sfd, int dfd, uint32_t l); int copy_file(const char *src, const char *dst, int c); +int move_file(const char *src, const char *dst, int c); int copy_or_link_file(const char *src, const char *dst, int c); /* Remove all directories between path and root if they are empty. */ @@ -42,10 +48,10 @@ int mkdir_p(const char *path, mode_t m); /* Create all leading directories in path */ int makeprefixpath(const char *path, mode_t m); -int move_file(const char *src, const char *dst, int c); +int question(const char *q, const char *resp); + +/* Same as /bin/rm -rf in the shell */ +int rm_rf(const char *root, int rec); -#ifndef MIN -#define MIN(a,b) ((a)<(b)?(a):(b)) -#endif #endif -- cgit