GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
VOP_RENAME(9) FreeBSD 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:

fdvp
The vnode of the old parent directory.
fvp
The vnode of the file to be renamed.
fcnp
Pathname information about the file's current name.
tdvp
The vnode of the new parent directory.
tvp
The vnode of the target file (if it exists).
tcnp
Pathname information about the file's new name.

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.

[]
The file is immutable.
[]
It is not possible to rename a file between different file systems.
[]
An attempt was made to rename . or .., or to perform an operation which would break the directory tree structure.
[]
An attempt was made to rename a directory to a file or vice versa.
[]
An attempt was made to remove a directory which is not empty.

vnode(9)

This manual page was written by Doug Rabson.
July 24, 1996 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 9 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.