18 #include <drizzled/internal/my_sys.h>
19 #include <drizzled/error.h>
20 #include <drizzled/internal/m_string.h>
29 int my_rename(
const char *from,
const char *to, myf MyFlags)
33 #if defined(HAVE_FILE_VERSIONS)
36 MY_STAT my_stat_result;
38 if (my_stat(to,&my_stat_result,MYF(0)))
42 if (MyFlags & MY_FAE+MY_WME)
43 my_error(EE_LINK, MYF(ME_BELL+ME_WAITTANG),from,to,errno);
53 if (MyFlags & (MY_FAE+MY_WME))
54 my_error(EE_LINK, MYF(ME_BELL+ME_WAITTANG),from,to,errno);
56 else if (MyFlags & MY_SYNC_DIR)
58 #ifdef NEED_EXPLICIT_SYNC_DIR
60 char dir_from[FN_REFLEN], dir_to[FN_REFLEN];
61 size_t dir_from_length, dir_to_length;
62 dirname_part(dir_from, from, &dir_from_length);
63 dirname_part(dir_to, to, &dir_to_length);
64 if (my_sync_dir(dir_from, MyFlags) ||
65 (strcmp(dir_from, dir_to) &&
66 my_sync_dir(dir_to, MyFlags)))
TODO: Rename this file - func.h is stupid.