muimaster.library: support Listview_List in List
[AROS.git] / compiler / posixc / remove.c
blob26c8352741812cd7932f8b196ced64111b2c49d8
1 /*
2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 $Id$
5 C99 function remove() with optional Amiga<>Posix file name conversion.
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
42 Uses stdcio.library remove() function after path name conversion
44 ******************************************************************************/
45 int __posixc_remove(const char * pathname)
47 return remove(__path_u2a(pathname));
48 } /* remove */
51 /*****************************************************************************
53 NAME
54 #include <unistd.h>
56 int unlink (
58 SYNOPSIS
59 const char * pathname)
61 FUNCTION
62 Delete a file from disk.
64 INPUTS
65 pathname - Complete path to the file
67 RESULT
68 0 on success and -1 on error. In case of an error, errno is set.
70 NOTES
71 Identical to remove
73 EXAMPLE
74 // Delete the file xyz in the current directory
75 unlink ("xyz");
77 BUGS
79 SEE ALSO
80 remove()
82 INTERNALS
84 ******************************************************************************/