HP 3000 Manuals

rename [ HP C/iX Library Reference Manual ] MPE/iX 5.0 Documentation


HP C/iX Library Reference Manual

rename 

Renames an existing file.

Syntax 

     #include <stdio.h>
     int rename (const char *oldname, const char *newname);

Parameters 

oldname       A pointer to a string containing the name of the existing
              file whose name is to be changed.  The string must be
              terminated by a null character.

newname       A pointer to a string containing the new name of the file.
              The string must be terminated by a null character.

Return Values 

0             The file is successfully renamed.

-1            An error occurred.  The file is not renamed.

Description 

The rename function changes the file named by oldname so that it has the
name newname.
[REV BEG]


NOTE The rename function is not supported in the POSIX/iX library. If called, rename() returns a -1 and sets errno to ENOSYS to indicate that rename() is not supported.
[REV END] See Also remove(), ANSI C 4.9.4.2


MPE/iX 5.0 Documentation