Provided by: freebsd-manpages_12.0-1_all
VOP_REMOVE, VOP_RMDIR — remove a file or directory
#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);
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.
Both dvp and vp should be locked on entry and remain locked on return.
Zero is returned on success, otherwise an error code is returned.
[EPERM] The file is immutable. [ENOTEMPTY] An attempt was made to remove a directory which is not empty.
This manual page was written by Doug Rabson.