xref: /titanic_50/usr/src/man/man3c/remove.3c (revision 5d0e1406420f52cc4d3d0543044034c4894b5865)
te
Copyright 1989 AT&T Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved
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.
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.
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]
REMOVE 3C "Aug 14, 2002"
NAME
remove - remove file
SYNOPSIS

#include <stdio.h>

int remove(const char *path);
DESCRIPTION

The remove() function causes the file or empty directory whose name is the string pointed to by path to be no longer accessible by that name. A subsequent attempt to open that file using that name will fail, unless the file is created anew.

For files, remove() is identical to unlink(). For directories, remove() is identical to rmdir().

See rmdir(2) and unlink(2) for a detailed list of failure conditions.

RETURN VALUES

Upon successful completion, remove() returns 0. Otherwise, it returns -1 and sets errno to indicate an error.

ATTRIBUTES

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE ATTRIBUTE VALUE
Interface Stability Standard
MT-Level MT-Safe
SEE ALSO

rmdir(2), unlink(2), attributes(5), standards(5)