VOP_RMDIR(9freebsd)

VOP_RMDIR9freebsd

Remove a file or directory

Part of VOP_REMOVE(9freebsd).

Usage

#include <sys/param.h>

#include <sys/vnode.h>

int

VOP_REMOVE(struct vnode *dvp, struct vnode *vp, struct componentname *cnp);

int

VOP_RMDIR(struct vnode *dvp, struct vnode *vp, struct componentname *cnp);

Overview

These entry points remove files and directories respectively.

The arguments are:

dvp

The vnode of the directory.

vp

The vnode of the file to be removed.

cnp

Pathname information about the file.

Locks

Both dvp and vp should be locked on entry and remain locked on return.

Return values

Zero is returned on success, otherwise an error code is returned.

Errors

[EPERM]

The file is immutable.

[ENOTEMPTY]

An attempt was made to remove a directory which is not empty.

Releases

9 releases since Debian 5.0 (Lenny); the text changed 6 times.

  1. 5.0
  2. 6.0
  3. 7
  4. 8
  5. 9
  6. 10
  7. 11–13

Authors

This manual page was written by Doug Rabson.

From freebsd-manpages 12.2-2 in Debian 13 (Trixie). Parsed by carta from the page's mdoc source.