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