Print only the complete information if the fd is valid itself (in is_valid_fd).
[reactos.git] / reactos / lib / crt / io / unlink.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 /*
20 * @implemented
21 */
22 int _unlink(const char* filename)
23 {
24 DPRINT("_unlink('%s')\n", filename);
25 if (!DeleteFileA(filename)) {
26 _dosmaperr(GetLastError());
27 return -1;
28 }
29 return 0;
30 }