std::filesystem::directory_entry::hard_link_count
来自cppreference.com
| |
(1) | (C++17 起) |
| |
(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 。
1) 抛出 std::filesystem::filesystem_error,构造时以
p 为第一路径实参并以OS 错误码为错误码实参。示例
| 本节未完成 原因:暂无示例 |
参阅
(C++17) |
返回指代特定文件的硬链接数 (函数) |