Unleashed v1.4
[unleashed.git] / share / man / man3c / remove.3c
blob0870752daa82e3f173b4eae9462796d37f32a5e3
1 '\" te
2 .\"  Copyright 1989 AT&T  Copyright (c) 2002, Sun Microsystems, Inc.  All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH REMOVE 3C "Aug 14, 2002"
7 .SH NAME
8 remove \- remove file
9 .SH SYNOPSIS
10 .LP
11 .nf
12 #include <stdio.h>
14 \fBint\fR \fBremove\fR(\fBconst char *\fR\fIpath\fR);
15 .fi
17 .SH DESCRIPTION
18 .sp
19 .LP
20 The \fBremove()\fR function causes the file or empty directory whose name is
21 the string pointed to by \fIpath\fR to be no longer accessible by that name. A
22 subsequent attempt to open that file using that name will fail, unless the file
23 is created anew.
24 .sp
25 .LP
26 For files, \fBremove()\fR is identical to  \fBunlink()\fR. For directories,
27 \fBremove()\fR is identical to \fBrmdir()\fR.
28 .sp
29 .LP
30 See \fBrmdir\fR(2) and \fBunlink\fR(2) for a detailed list of failure
31 conditions.
32 .SH RETURN VALUES
33 .sp
34 .LP
35 Upon successful completion, \fBremove()\fR returns \fB0\fR. Otherwise, it
36 returns \fB\(mi1\fR and sets \fBerrno\fR to indicate an error.
37 .SH ATTRIBUTES
38 .sp
39 .LP
40 See \fBattributes\fR(5) for descriptions of the following attributes:
41 .sp
43 .sp
44 .TS
45 box;
46 c | c
47 l | l .
48 ATTRIBUTE TYPE  ATTRIBUTE VALUE
50 Interface Stability     Standard
52 MT-Level        MT-Safe
53 .TE
55 .SH SEE ALSO
56 .sp
57 .LP
58 \fBrmdir\fR(2), \fBunlink\fR(2), \fBattributes\fR(5), \fBstandards\fR(5)