Megosztás a következőn keresztül:


rename Function

Renames an existing file.

template<class Path1, class Path2>
inline bool rename(
   const Path1& Pval1,
   const Path2& Pval2
);

Parameters

  • Pval1
    A Path object that refers to an existing file. Path can be either a basic_path or a type that is derived from basic_path.

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

Return Value

true if the file is renamed; otherwise, false.

Requirements

Header: filesystem

Namespace: std::tr2::sys

See Also

Reference

<filesystem>

Other Resources

C++ Standard Library Header Files