This page applies to Harlequin v13.1r0 and later; and to Harlequin Core but not Harlequin MultiRIP
int32 rename_file ( DEVICELIST *dev, uint8 *file1, uint8 *file2);
This routine renames the file file1 with the new name file2 . If the rename succeeds, then it should return 0 . If the rename fails -1 should be returned.
If no file is named file1 then last_error should return DeviceUndefined . If the device does not support renaming, or the particular filenames are not permitted to be changed, then last_error should return DeviceInvalidAccess . If some other error occurs, then last_error should return DeviceIOError .
Whether an error is returned if a file with name file2 already exists is implementation defined. If possible, the routine should not remove the filename file1 until it is known that the rename will succeed.