共用方式為


create_directories 函式

會從指定的檔案名稱的目錄。 同時建立中繼目錄所需。

template<class Path>
inline bool create_directories(
   const Path& Pval
);

參數

  • Pval
    Path 物件包含目錄路徑。 Path 可以是 basic_path 或衍生自 basic_path的型別。

傳回值

true ,如果目錄建立成功; false ,如果目錄已經存在。

備註

如果目錄不可建立,函式會擲回 basic_filesystem_error

需求

標題: 檔案系統

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

請參閱

參考

<filesystem>

其他資源

標頭檔