Print only the complete information if the fd is valid itself (in is_valid_fd).
[reactos.git] / reactos / lib / crt / io / wunlink.c
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS system libraries
4 * FILE: lib/msvcrt/io/unlink.c
5 * PURPOSE: Deletes a file
6 * PROGRAMER: Boudewijn Dekker
7 * UPDATE HISTORY:
8 * 28/12/98: Created
9 */
10
11 #include "precomp.h"
12 #include <io.h>
13 #include <internal/file.h>
14
15 #define NDEBUG
16 #include <internal/debug.h>
17
18 /*
19 * @implemented
20 */
21 int _wunlink(const wchar_t* filename)
22 {
23 DPRINT("_wunlink('%S')\n", filename);
24 if (!DeleteFileW(filename)) {
25 _dosmaperr(GetLastError());
26 return -1;
27 }
28 return 0;
29 }