delete

Deletes a file.

Format

#include  <unixio.h>

int delete  (const char *file_spec);

Argument

file_spec
A pointer to the string that is an OpenVMS or UNIX style file specification. The file specification can include a wildcard in its version number (but not in any other part of the file spec). So, for example, files of the form filename.txt;* can be deleted.

Description

If you specify a directory in the file name and it is a search list that contains an error, DEC C for OpenVMS Systems interprets it as a file error.

The remove and delete functions are functionally equivalent in the DEC C RTL.

See also remove in this section.


Note
The delete routine is not available to C++ programmers because it conflicts with the C++ reserved word delete. C++ programmers should use the ANSI/ISO C standard function remove instead.

Return Values
Indicates success. 
nonzero value  Indicates that the operation has failed. 


Previous Page | Next Page | Table of Contents | Index