Namespaces
Variants

std::experimental::filesystem::path:: has_...

From cppreference.net
bool has_root_path ( ) const ;
(1) (文件系统 TS)
bool has_root_name ( ) const ;
(2) (文件系统 TS)
bool has_root_directory ( ) const ;
(3) (文件系统 TS)
bool has_relative_path ( ) const ;
(4) (文件系统 TS)
bool has_parent_path ( ) const ;
(5) (文件系统 TS)
bool has_filename ( ) const ;
(6) (文件系统 TS)
bool has_stem ( ) const ;
(7) (文件系统 TS)
bool has_extension ( ) const ;
(8) (文件系统 TS)

检查路径是否包含对应的路径元素。

1) 检查 root_path() 是否为空。
2) 检查 root_name() 是否为空。
3) 检查 root_directory() 是否为空。
4) 检查 relative_path() 是否为空。
5) 检查 parent_path() 是否为空。
6) 检查 filename() 是否为空。
7) 检查 stem() 是否为空。
8) 检查 extension() 是否为空。

目录

参数

(无)

返回值

true 表示对应路径不为空, false 则表示相反情况。

异常

可能抛出实现定义的异常。

参见

检查路径是否为空
(公开成员函数)