VOP_RENAME(9) | Kernel Developer's Manual | VOP_RENAME(9) |
VOP_RENAME
—
rename a file
#include
<sys/param.h>
#include <sys/vnode.h>
int
VOP_RENAME
(struct
vnode *fdvp, struct vnode
*fvp, struct
componentname *fcnp,
struct vnode *tdvp,
struct vnode *tvp,
struct componentname
*tcnp);
This renames a file and possibly changes its parent directory. If the destination object exists, it will be removed first.
Its arguments are:
The source directory and file are unlocked but are expected to have their ref count bumped on entry. The VOP routine is expected to vrele(9) both prior to returning.
The destination directory and file are locked as well as having their ref count bumped. The VOP routine is expected to vput(9) both prior to returning.
EPERM
]EXDEV
]EINVAL
]ENOTDIR
]ENOTEMPTY
]This manual page was written by Doug Rabson.
July 24, 1996 | Debian |