1REMOVE(P) POSIX Programmer's Manual REMOVE(P)
2
3
4
6 remove - remove a file
7
9 #include <stdio.h>
10
11 int remove(const char *path);
12
13
15 The remove() function shall cause the file named by the pathname
16 pointed to by path to be no longer accessible by that name. A subseā
17 quent attempt to open that file using that name shall fail, unless it
18 is created anew.
19
20 If path does not name a directory, remove(path) shall be equivalent to
21 unlink(path).
22
23 If path names a directory, remove(path) shall be equivalent to
24 rmdir(path).
25
27 Refer to rmdir() or unlink() .
28
30 Refer to rmdir() or unlink() .
31
32 The following sections are informative.
33
35 Removing Access to a File
36 The following example shows how to remove access to a file named
37 /home/cnd/old_mods.
38
39
40 #include <stdio.h>
41
42
43 int status;
44 ...
45 status = remove("/home/cnd/old_mods");
46
48 None.
49
51 None.
52
54 None.
55
57 rmdir() , unlink() , the Base Definitions volume of
58 IEEE Std 1003.1-2001, <stdio.h>
59
61 Portions of this text are reprinted and reproduced in electronic form
62 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
63 -- Portable Operating System Interface (POSIX), The Open Group Base
64 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
65 Electrical and Electronics Engineers, Inc and The Open Group. In the
66 event of any discrepancy between this version and the original IEEE and
67 The Open Group Standard, the original IEEE and The Open Group Standard
68 is the referee document. The original Standard can be obtained online
69 at http://www.opengroup.org/unix/online.html .
70
71
72
73IEEE/The Open Group 2003 REMOVE(P)