method

rename

v2_2_9 - Show latest stable - Class: File
rename(p1, p2)
public

Renames the given file to the new name. Raises a SystemCallError if the file cannot be renamed.

File.rename("afile", "afile.bak")   #=> 0