tf_rename(), sf_rename()

Purpose

Renames an existing file

Old names

#define _vrename tf_rename
#define _arename sf_rename

Syntax (CCOWN)

int tf_rename(const char *new_name, const char * old_name)

Syntax (DP4DBAPI)

int dp4_sf_rename(CONN * conn,const char * new_name, const char * old_name)

Parameters

char* new_name

New name for file (null terminated)

 

char* old_name

Existing name of file (null terminated)

Description

The tf_rename() and sf_rename() functions change the name of an existing file. Both the existing file and the new file must be on the same disk and file system. The renaming operation fails if the new file already exists as a file or as a directory.

Return values

Returns TRUE if the operation is successful, otherwise FALSE