RenameFile

Last Updated2014-08-30
Created At2007-01-07

Renames a file.

native bool RenameFile(const char[] newpath, const char[] oldpath, bool use_valve_fs = false, const char[] valve_path_id = "DEFAULT_WRITE_PATH")

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

bool True on success or use_valve_fs specified, false otherwise.