SilverScreen Solid Modeler

rename

rename

Previous topic Next topic  

rename

Previous topic Next topic JavaScript is required for the print function  

StandardCLibrary

 

int rename( char *oldname, char *newname )

 

char *oldname;          /* old filename */

char *newname;          /* new filename */

 

 




Synopsis

#include "stdio.h"

 

The rename function renames a file on disk.

 

 

Parameters

oldname and newname are null-terminated strings containing the old and new names of the designated file, respectively.

 

 

Return Value

rename returns 0 if the function was successful. If an error occurred, then rename returns a negative value, and sets errno (the system error variable) to one of the following:

 

Value

Meaning

EXDEV

attempt to rename the file to a different disk drive

ENOENT

the file specified by oldname was not found

EACESS

the file specified by newname cannot be created or already exists

 

 

See Also

remove , unlink