[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions , Volume 2


remove Subroutine

Purpose

Removes a file.

Library

Standard C Library (libc.a)

Syntax

#include <stdio.h>


int remove( FileName)
const char *FileName;

Description

The remove subroutine makes a file named by FileName inaccessible by that name. An attempt to open that file using that name does not work unless you recreate it. If the file is open, the subroutine does not remove it.

If the file designated by the FileName parameter has multiple links, the link count of files linked to the removed file is reduced by 1.

Parameters


FileName Specifies the name of the file being removed.

Return Values

Upon successful completion, the remove subroutine returns a value of 0; otherwise it returns a nonzero value.

Implementation Specifics

This subroutine is part of Base Operating System (BOS) Runtime.

Related Information

The link subroutine, rename (rename Subroutine) subroutine.

The link or unlink (unlink Subroutine) command.

Files, Directories, and File Systems for Programmers in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]