#ifndef fooutilhfoo #define fooutilhfoo #include #include void statistics(DB *db); char* normalize_path(char *s); void rotdash(void); const char* get_attached_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 copy_or_link_file(const char *src, const char *dst, int c); /* Remove all directories between path and root if they are empty. */ int prune_empty_directories(const char *path, const char *root); /* Same as /bin/mkdir -p in the shell */ 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); #ifndef MIN #define MIN(a,b) ((a)<(b)?(a):(b)) #endif #endif