共用方式為


complete 函式

建立完整路徑,如果可能,從指定的 Path 值。

template<class Path>
inline Path complete(
   const Path& Pval,
   const Path& Pbase = initial_path<Path>()
);

參數

  • Pval
    型別 Path 的物件。 Path 可以是 basic_path 或衍生自 basic_path的型別。

  • Pbase
    型別 Path 的物件。 根據預設,這個值是在程式啟動時的工作目錄。

傳回值

如果 Pval 有根名稱,函式會傳回 Pval。

否則,則為 Pval ,如果有一個根目錄,函式會傳回 Pbase.root_name / Pval。

否則,函式會傳回 Pbase / Pval。

需求

標題: 檔案系統

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

請參閱

參考

<filesystem>

basic_path::root_name 方法

basic_path::root_directory 方法

運算子 / (STL)

其他資源

標頭檔