HELPLIB.HLB  —  CRTL  delete
    Deletes a file.

    Format

      #include  <unixio.h>

      int delete  (const char *file_spec);

1  –  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.

2  –  Description

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

    When delete is used to delete a symbolic link, the link itself is
    deleted, not the file to which it refers.

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

    See also remove.

                                   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.

3  –  Return Values

    0                  Indicates success.
    nonzero value      Indicates that the operation has failed.
Close Help