RenameFile Function

Renames a file.

bool RenameFile(const char[] newpath, const char[] oldpath, bool use_valve_fs, const char[] valve_path_id)

Parameters

const char[] newpath

New path to the file.

const char[] oldpath

Path to the existing file.

bool use_valve_fs

If true, the Valve file system will be used instead. This can be used to rename files in the game's Valve search paths, rather than directly in the gamedir.

const char[] valve_path_id

If use_valve_fs, a search path from gameinfo or NULL_STRING for all search paths.

Return Value

True on success or use_valve_fs specified, false otherwise.