std::filesystem::directory_entry:: hard_link_count
From cppreference.net
<
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)
|
返回指向特定文件的硬链接数量
(函数) |