rename Function

Renames an existing file.

void rename(const path& Pval1, const path& Pval2);
void rename(const path& Pval1, const path& Pval2, error_code& Err) _NOEXCEPT;

Pval1

A path object that refers to an existing file.

Pval2

A Path object that contains the new file name for the existing file.

Err

An error_code value that (on Windows) is returned from GetLastError.

true if the file is renamed; otherwise, false.

Header: filesystem

Namespace: std::tr2::sys

Show: