s_rename_file

Changes the pathname of a named directory or data file, including remote and DOS. It cannot be used for stream or physical files.

/Note

When you rename a directory, you change the paths for all files and other directories contained in the directory.

Syntax, PL/M and C

CALL rq$s$rename$file (path_ptr, new_path_ptr, except_ptr);

rq_s_rename_file (path_ptr, new_path_ptr, except_ptr);

Parameter PL/M Data Type C Data Type
path_ptr POINTER STRING far *
new_path_ptr POINTER STRING far *
except_ptr POINTER to WORD_16 UINT_16 far *

Parameters

path_ptr
A pointer to a STRING that specifies the current path for an existing file or directory to be renamed.

new_path_ptr
A pointer to a STRING that specifies the new path for the file. This path must comply with the syntax and semantics of paths for named files. This path cannot refer to an existing file.

See also:Paths, System Concepts

except_ptr
A pointer to a variable declared by the application where the call returns a condition code.

Additional Information

A task can change any aspect of a directory's or file's path so long as it remains on the same volume.

DOS users cannot rename a directory as a subdirectory. The DOS World user must have write access to the file to rename it; write (delete, append, update, add-entry, and change-entry) access is optional.

The iRMX default user object of the calling task's job must have deletion access to the original file and add-entry access to the file's new parent directory.

See also:s_change_access, BIOS call a_change_access

S_rename_file cannot rename these iRMX-NET entries:

ˇA file in a virtual root directory

ˇA virtual root directory

ˇA public directory

The remote directory's or file's access rights are checked during operations on the connection. This won't affect your programs if you:

ˇOpen, delete, and rename prior to changing access lists.

ˇEstablish connections after changing access lists.

Condition Codes

E_OK 0000H No exceptional conditions occurred.
E_ALREADY_ATTACHED 0038H The EIOS is unable to attach the device containing the file because the BIOS has done so.
E_CONTEXT 0005H The calling task's job is not an I/O job.
E_DEV_DETACHING 0039H The device containing the specified file is being detached.
E_DEVFD 0022H The EIOS attempted to physically attach a device that had been only logically attached, and found that the device and the device driver specified in the logical attachment were incompatible.
E_FACCESS 0026H At least one of these is true:

ˇThe call is trying to rename a bit-map file or the root directory.

ˇThe default user object associated with the calling task's job does not have add-entry access to the parent directory of the new_path_ptr file.

ˇThe default user object associated with the calling task's job does not have delete access to the file being renamed.

E_FEXIST 0020H The new_path_ptr parameter refers to a file that already exists.
E_FNEXIST 0021H A file in the specified path, or the file being renamed, does not exist or is marked for deletion.
E_FTYPE 0027H A path component is not a directory file.
E_IFDR 002FH The specified file is a stream or physical file.
E_ILLOGICAL_RENAME 003BH The call attempted to rename a directory to a new path containing itself.
E_ILLVOL 002DH The EIOS attempted to physically attach a device that had formerly been only logically attached. It found that the volume does not contain named files. The named file driver was requested during logical attachment.
E_INVALID_FNODE 003DH The fnode for the specified file is invalid. The file cannot be accessed; delete it or fix it with diskverify.

See also:diskverify, Command Reference

E_IO_HARD 0052H A hard error occurred; the BIOS cannot retry the request.
E_IO_OPRINT 0053H The device was off-line. Operator intervention is required.
E_IO_SOFT 0051H A soft I/O error occurred. The I/O System tried to perform the operation a number of times and failed (the number of retries is a configuration parameter). Another retry might be successful.

See also:For ICU-configurable systems, RPA parameter, ICU User's Guide and Quick Reference

E_IO_UNCLASS 0050H An unknown I/O error occurred.
E_IO_WRPROT 0054H The volume is write-protected.
E_IO_MEM 0042H The BIOS job does not currently have a block of memory large enough to allow this system call to complete.
E_LIMIT 0004H At least one of these is true:

ˇThe user object or the calling task's job is involved in 255 I/O operations.

ˇThe calling task's job is not an I/O job.

ˇThe calling task's object limit has been reached.

ˇProcessing this call would deplete the remote server's resources.

E_LOG_NAME_NEXIST 0045H At least one of the specified paths contains a logical name, but the call was unable to find this name in the object directories of the calling task's local job, the global job, or the root job.
E_LOG_NAME_SYNTAX 0040H At least one of the specified paths contain one or more of these logical name syntax errors:

ˇThe logical name was missing matching colons.

ˇA path contains a logical name that exceeds 12 characters, has no characters, or contains invalid characters.

E_MEDIA 0044H The device containing the specified file is off-line.
E_MEM 0002H The memory available to the calling task's job is not sufficient to complete the call.
E_NAME_NEXIST 0049H The user object does not represent a verified user or is not properly defined in the remote server's UDF. Only dynamic logon creates verified users.
E_NOPREFIX 8022H The default prefix for the calling task's job is undefined, or is not a valid device or file connection.
E_NOT_CONFIGURED 0008H This system call is not part of the present configuration.
E_NOT_FILE_CONN 0032H In the specified path, the subpath portion is null and the prefix portion is not a file connection.
E_NOT_LOG_NAME 8040H At least one of the specified paths contains a logical name that refers to an object that is not a device connection or a file connection.
E_NOT_SAME_DEV 003AH The two paths refer to different devices.
E_NOUSER 8021H The calling task's job does not have a default user object, or the object cataloged in r?iouser is not a user object.
E_PASSWORD_MISMATCH 004BH The password of the user object does not match the password of the corresponding user defined on the remote server.
E_PATHNAME_SYNTAX 003EH One or both of the specified pathnames contain invalid characters.
E_PARAM 8004H The specified task_priority for an I/O job is unequal to 0 and is greater than the max_priority of the I/O job.
E_SPACE 0029H At least one of these is true:

ˇThe volume is full.

ˇNo more files can be created on the remote server's volume. The remote file driver cannot distinguish between an E_FNODE_LIMIT and an E_SPACE condition code.


E_UDF_IO 02D0H An error occurred while accessing the remote server's UDF. The server's UDF must have World read permission.
E_SUPPORT 0023H The task attempted to rename a physical or stream file.