std::filesystem::directory_entry::hard_link_count
来自 cppreference.cn
< 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) |
返回引用特定文件的硬链接数量 (函数) |