rename 函式

若要將現有的檔案。

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

參數

  • Pval1
    參考現有檔案的 Path 物件。 Path 可以是 basic_path 或從 basic_path衍生型別 (Derived Type)。

  • Pval2
    包含新的檔案名稱]取代現有的 Path 物件。

傳回值

true ,如果檔案重新命名為,否則, false。

需求

標題: 檔案系統

命名空間: std::tr2::sys

請參閱

參考

<filesystem>

其他資源

標頭檔