Upgraded GRUB2 to 2.00 release.
[AROS.git] / compiler / clib / remove.c
blobb0bff1ff609504e18b69993273977f1557179c52
1 /*
2 Copyright © 1995-2012, The AROS Development Team. All rights reserved.
3 $Id$
5 C99 function remove().
6 */
8 #include <proto/dos.h>
9 #include <errno.h>
10 #include "__upath.h"
12 /*****************************************************************************
14 NAME */
15 #include <stdio.h>
17 int remove (
19 /* SYNOPSIS */
20 const char * pathname)
22 /* FUNCTION
23 Deletes a file or directory.
25 INPUTS
26 pathname - Complete path to the file or directory.
28 RESULT
29 0 on success and -1 on error. In case of an error, errno is set.
31 NOTES
32 Identical to unlink
34 EXAMPLE
36 BUGS
38 SEE ALSO
39 unlink()
41 INTERNALS
43 ******************************************************************************/
45 if (!DeleteFile (__path_u2a(pathname)))
47 errno = __arosc_ioerr2errno (IoErr());
48 return -1;
51 return 0;
52 } /* remove */