<filesystem>

包含標頭 <filesystem> 定義類別和函式檔案和目錄的作業。

#include <filesystem>

警告

<filesystem> 標頭不是 C ++. 標準,不過,為達標準化提交作業。這個字串會做為標準,我們將調查介面的影響。

Hh874694.collapse_all(zh-tw,VS.110).gifTypedef

名稱

描述

path

basic_path<string, path_traits>

wpath

basic_path<wstring, wpath_traits>

filesystem_error

basic_filesystem_error<path>

wfilesystem_error

basic_filesystem_error<wpath>

directory_entry

basic_directory_entry<path>

wdirectory_entry

basic_directory_entry<wpath>

directory_iterator

basic_directory_iterator<path>

wdirectory_iterator

basic_directory_iterator<wpath>

recursive_directory_iterator

basic_recursive_directory_iterator<path>

wrecursive_directory_iterator

basic_recursive_directory_iterator<wpath>

Hh874694.collapse_all(zh-tw,VS.110).gif類別

名稱

描述

basic_directory_entry 類別

描述由 *X傳回,其中 X 是 basic_directory_iteratorbasic_recursive_directory_iterator的物件。

basic_directory_iterator 類別

檔案系統目錄描述輸入 Iterator 那序列傳遞檔案名稱。

basic_filesystem_error 類別

擲回報告低階系統溢位的例外狀況的基底類別。

basic_path 類別

定義儲存樣板型別 String 物件適合做為檔案名稱的類別。

basic_recursive_directory_iterator 類別

檔案系統目錄描述輸入 Iterator 那序列傳遞檔案名稱。 Iterator 也可以放入子目錄。

file_status 類別

包裝 file_type

Hh874694.collapse_all(zh-tw,VS.110).gifStructs

名稱

描述

colon Structure

定義具有靜態資料成員表示冒號字元的 struct 。

dot Structure

定義具有靜態資料成員表示點字元的 struct 。

is_basic_path 結構

指定型別是否適合做為在 <filesystem> 標頭中所定義的其他範本的一 Path 參數。

path_traits 結構

描述特製化的 basic_path<string, path_traits>屬性。

slash Structure

定義具有靜態資料成員表示斜線字元的 struct 。

space_info 結構

保存有關容量的資訊。

wpath_traits 結構

描述特製化的 basic_path<wstring, wpath_traits>屬性。

Hh874694.collapse_all(zh-tw,VS.110).gif功能

名稱

描述

basename 函式

傳回指定之路徑的 縱線 。

complete 函式

如果可能會從指定的 Path 值的完整路徑。

copy_file 函式

在別的複製屬性和內容在檔案並貼上它們。

create_directories 函式

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

create_directory 函式

會從指定的檔案名稱的目錄。

create_hard_link 函式

建立強烈 連結 至現有檔案的。

create_symlink 函式

建立一個符號連結至現有檔案的。

current_path 函式

設定或擷取目前的工作目錄。

equivalent 函式

指定兩個檔名是否參考相同的檔案。

exists 函式

指定檔案是否存在。

extension 函式

擷取特定檔案的副檔名。

file_size 函式

傳回大小,以位元組表示具有指定名稱的,檔案。

initial_path 函式

傳回目前工作目錄在程式啟動。

is_directory 函式

指示指定的 file_status 或檔名是否表示目錄。

is_empty 函式

表示指定路徑是否參考空檔案或目錄。

is_other 函式

指示指定的 file_status 或檔名是否表示非檔案、目錄或一符號連結的現有檔案。

is_regular 函式

指示指定的 file_status 或檔名是否表示檔案。

is_regular_file 函式

指示指定的 file_status 或檔名是否表示檔案。

is_symlink 函式

指示指定的 file_status 或檔名是否表示符號連結。

last_write_time 函式

判斷特定檔案的最後寫入時間。

remove 函式

移除具有指定之路徑的檔案。

remove_all 函式

移除具有指定路徑的檔案或目錄。

remove_directory 函式

移除具有指定路徑的目錄。

remove_filename 函式

移除具有指定之路徑的檔案。

rename 函式

將現有檔案重新命名。

replace_extension 函式

取代指定檔案的副檔名。

space 函式

擷取所指定的容量的資訊。

status 函式

擷取指定檔案的狀態。

status_known 函式

指定特定檔案狀態是否知道。

stem 函式

傳回指定之路徑的 縱線 。

交換函式 (STL)

交換兩 basic_path 物件中儲存的檔案名稱。

symlink_status 函式

擷取特定檔案的符號連結狀態。

system_complete 函式

如果可以轉換為指定的檔名的完整檔名,。

Hh874694.collapse_all(zh-tw,VS.110).gif運算子

名稱

描述

運算子! = (STL)

使用與 basic_pathbasic_directory_iteratorbasic_recursive_directory_iterator 物件的不等比較運算子。

運算子 = = (STL)

使用與 basic_pathbasic_directory_iteratorbasic_recursive_directory_iterator 物件的等號比較運算子。

運算子 << 運算子

將指定之物件的儲存路徑至資料流的。

運算子 < (STL)

表示 basic_path 物件中儲存的字串值是否小於另一 basic_path 物件。

運算子 < = (STL)

表示 basic_path 物件中儲存的字串值是否小於或等於另一 basic_path 物件。

運算子 >> 運算子

basic_istream 擷取 string 並將它指派給 Path 物件。

運算子 > (STL)

表示 basic_path 物件中儲存的字串值是否大於另一 basic_path 物件。

運算子 > = (STL)

表示 basic_path 物件中儲存的字串值是否大於或等於另一 basic_path 物件。

運算子 / (STL)

串連兩個 basic_path 物件中儲存的檔案名稱。

Hh874694.collapse_all(zh-tw,VS.110).gif列舉

名稱

描述

copy_option 列舉型別

使用與 copy_file 並判斷行為的列舉型別,如果目的檔案已經存在。

file_type 列舉型別

檔案類型的列舉。

請參閱

其他資源

標頭檔