xref: /original-bsd/share/man/man3f/rename.3 (revision a1c2194a)
Copyright (c) 1983 The Regents of the University of California.
All rights reserved.

%sccs.include.proprietary.roff%

@(#)rename.3 6.2 (Berkeley) 04/30/91

RENAME 3F ""
C 5
NAME
rename - rename a file
SYNOPSIS
integer function rename (from, to)

character*(*) from, to

DESCRIPTION
From must be the pathname of an existing file. To will become the new pathname for the file. If to exists, then both from and to must be the same type of file, and must reside on the same filesystem. If to exists, it will be removed first.

The returned value will be 0 if successful; a system error code otherwise.

FILES
"SEE ALSO"
rename(2), perror(3F)
BUGS
Pathnames can be no longer than MAXPATHLEN as defined in < sys/param.h >.