VMS Help  —  CRTL  rmdir
    Removes a directory file.

    Format

      #include  <unistd.h>

      int rmdir  (const char *path);

1  –  Argument

 path

    A directory pathname.

2  –  Description

    The rmdir function removes a directory file whose name is
    specified in the path argument. The directory is removed only
    if it is empty.

    If path names a symbolic link, then rmdir fails and sets errno to
    ENOTDIR.

3  –  Restriction

    When using OpenVMS format names, the path argument must be in the
    form directory.dir.

4  –  Return Values

    0                  Indicates success.
    -1                 An error occurred; errno is set to indicate
                       the error.
Close Help