13 int mv(
const char *file,
int file_len,
const char *src,
int src_len,
const char *dest,
int dest_len)
15 char *frompath =
create_path(src, src_len, file, file_len);
16 char *topath =
create_path(dest, dest_len, file, file_len);
17 if(rename(frompath, topath) != 0)
19 output(LOG_WARNING,
_(
"cannot move file '%s' to '%s': %s"), frompath, topath, strerror(errno));
int mv(const char *file, int file_len, const char *src, int src_len, const char *dest, int dest_len)
char * create_path(const char *dir, int dirlen, const char *file, int filelen)