.\" This manpage has been automatically generated by docbook2man .\" from a DocBook document. This tool can be found at: .\" .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . .TH "GFS_RENAME" "3" "13 November 2006" "Gfarm" "" .SH NAME gfs_rename \- change the name or location of a file .SH SYNOPSIS .sp \fB#include .sp char *gfs_rename (char * \fIgfarm_url_from\fB, char * \fIgfarm_url_to\fB); \fR .SH "DESCRIPTION" .PP \fBgfs_rename\fR renames a file or directory \fIgfarm_url_from\fR to \fIgfarm_url_to\fR\&. .PP If \fIgfarm_url_to\fR already exists, it will be replaced. In this case, when \fIgfarm_url_from\fR is a file \fIgfarm_url_to\fR also must be a file, when \fIgfarm_url_from\fR is a directory, \fIgfarm_url_to\fR must be a empty directory. .PP \fBGfs_rename()\fR can't rename a directory to a subdirectory of itself. .SH "RETURN VALUES" .TP \fBNULL\fR The function terminated successfully. .TP \fBGFARM_ERR_NO_MEMORY\fR Insufficient memory was available. .TP \fBGFARM_ERR_AUTHENTICATION\fR User authentication failed when connecting to gfmd(8). .TP \fBGFARM_ERR_PERMISSION_DENIED\fR The parent directory of \fIgfarm_url_from\fR or \fIgfarm_url_to\fR did not allow write permission. .TP \fBGFARM_ERR_INVALID_ARGUMENT\fR A attempt was made to rename the directory \fIgfarm_url_from\fR to a subdirectory of itself. .TP \fBGFARM_ERR_NO_SUCH_OBJECT\fR \fIgfarm_url_from\fR does not exist. .TP \fBGFARM_ERR_IS_A_DIRECTORY\fR \fIgfarm_url_to\fR is a existing directory, though \fIgfarm_url_from\fR is not a directory. .TP \fBGFARM_NOT_IS_A_DIRECTORY\fR \fIgfarm_url_to\fR is not a directory. though \fIgfarm_url_from\fR is a directory. .TP \fBOthers\fR An error except the above occurred. The reason is shown by its pointed strings.