std::filesystem::directory_entry::hard_link_count
來自 cppreference.com
< cpp | filesystem | directory_entry
std::uintmax_t hard_link_count() const; |
(1) | (C++17 起) |
std::uintmax_t hard_link_count( std::error_code& ec ) const noexcept; |
(2) | (C++17 起) |
如果此 directory_entry
中快取了硬連結數,則返回快取值。否則,返回
1) std::filesystem::hard_link_count(path()),
2) std::filesystem::hard_link_count(path(), ec)。
目錄 |
[編輯] 引數
ec | - | 非丟擲過載中用於錯誤報告的出參 |
[編輯] 返回值
所引用的檔案系統物件的硬連結數。
[編輯] 異常
任何未標記為 noexcept
的過載都可能在記憶體分配失敗時丟擲 std::bad_alloc。
[編輯] 示例
本節不完整 原因:無示例 |
[編輯] 參閱
(C++17) |
返回引用特定檔案的硬連結數量 (函式) |