rfio_rename man page

RFIO_RENAME(3) Rfio Library Functions RFIO_RENAME(3)

rfio_rename - rename a file or directory

[1m#include <sys/types.h>[0m
[1m#include "rfio_api.h"[0m

[1mint rfio_rename (const char *[4m[22moldpath[24m[1m, const char *[4m[22mnewpath[24m[1m)[0m

[1mrfio_rename [22mrenames a file or directory.

[4moldpath[24m and [4mnewpath[24m must be of the same type, i.e. both regular files
or both directories.

If [4mnewpath[24m exists already, it will be removed before the rename takes
place. If [4mnewpath[24m is a directory, it must be empty.

When renaming a directory, [4mnewpath[24m must not be a descendant of [4moldpath[24m,
i.e. [4mnewpath[24m must not contain a path prefix that names [4moldpath[24m.

Write permission is required on both parents. If [4moldpath[24m is a direc-
tory, write permission is required on it and if [4mnewpath[24m is an existing
directory, write permission is also required on it.

If any of the parents has the sticky bit S_ISVTX set, either

the effective user ID of the requestor must match the owner ID
of the file or

the effective user ID of the requestor must match the owner ID
of the directory or

the file must be writable by the requestor or

the requestor must be super-user.

This routine returns 0 if the operation was successful or -1 if the
operation failed. In the latter case, [1mserrno [22mis set appropriately.

[1mENOENT [22mA component of [4moldpath[24m prefix does not exist or [4moldpath[24m or
[4mnewpath[24m is a null pathname.

[1mEACCES [22mSearch permission is denied on a component of the path
prefixes or write permission on the parent directories is
denied or [4moldpath[24m is a directory and write permission is
denied on [4moldpath[24m or [4mnewpath[24m.

[1mEFAULT [4m[22moldpath[24m or [4mnewpath[24m is a NULL pointer.

[1mEEXIST [4m[22mnewpath[24m is an existing directory and is not empty.

[1mENOTDIR [22mA component of the path prefixes is not a directory or
[4moldpath[24m is a directory and [4mnewpath[24m is an existing regular

[1mEISDIR [4m[22mnewpath[24m is a directory while [4moldpath[24m is a regular file.

[1mEINVAL [4m[22mnewpath[24m is a descendant of [4moldpath[24m.

[1mENAMETOOLONG [22mThe length of [4moldpath[24m or [4mnewpath[24m exceeds [1mCA_MAXPATHLEN [22mor
the length of a path component exceeds [1mCA_MAXNAMELEN[22m.

[1mSENOSHOST [22mHost unknown.

[1mSENOSSERV [22mService unknown.

[1mSECOMERR [22mCommunication error.

[1mERFXHOST [22mCross-host rename is not supported.

[1mSEE ALSO[0m
[1mCastor_limits(4)[22m, [1mrfio_chmod(3)[22m, [1mrfio_unlink(3)[0m

[1mLCG Grid Deployment [22mTeam

LCG $Date: 2005/03/31 13:13:03 $ RFIO_RENAME(3)