add-name-to-file is an interactive built-in function in `C source code'.

(add-name-to-file FILE NEWNAME &optional OK-IF-ALREADY-EXISTS)

Give FILE additional name NEWNAME. Both args must be strings.
Signals a `file-already-exists' error if a file NEWNAME already exists
unless optional third argument OK-IF-ALREADY-EXISTS is non-nil.
A number as third arg means request confirmation if NEWNAME already exists.
This is what happens in interactive use with M-x.