:pserver:cvsanon@mok.lvcm.com:/CVS/ReactOS reactos
[reactos.git] / lib / msvcrt / stdio / rename.c
1 #include <windows.h>
2 #include <msvcrt/stdio.h>
3 #include <msvcrt/io.h>
4
5
6 int rename(const char *old_, const char *new_)
7 {
8   if (old_ == NULL || new_ == NULL)
9     return -1;
10
11   if (!MoveFileA(old_,new_))
12     return -1;
13
14   return 0;
15 }
16
17 int _wrename(const wchar_t *old_, const wchar_t *new_)
18 {
19   if (old_ == NULL || new_ == NULL)
20     return -1;
21
22   if (!MoveFileW(old_,new_))
23     return -1;
24
25   return 0;
26 }
27