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) |
返回指向特定文件的硬链接数 (函数) |