Guardian C Library Calls Reference Manual

Reference to Library Calls
Guardian TNS C Library Calls Reference Manual128833 3-153
rename
remove
The remove function purges a disk file.
file_name
points to a string containing a valid Guardian file name.
Return Value
is zero if the operation is successful; otherwise, remove returns a nonzero value (and
the file is not purged).
Usage Guidelines
If the specified file is open, remove returns a nonzero value and does not close or
purge the file.
rename
The rename function changes the name of a disk file.
current_name
points to a string containing a valid Guardian file name, specifying the current name
of the file.
new_name
points to a string containing a valid Guardian file name, specifying the new name for
the file.
Return Value
is zero if the operation is successful; otherwise, rename returns a nonzero value (and
the name of the file is not changed).
Usage Guidelines
If the specified file is open, rename returns a nonzero value and does not rename the
file.
#include <stdioh>
int remove(const char *file_name);
#include <stdioh>
int rename(const char *current_name, const char *new_name);