std::filesystem::path::has_root_path, std::filesystem::path::has_root_name, std::filesystem::path::has_root_directory, std::filesystem::path::has_relative_path, std::filesystem::path::has_parent_path, std::filesystem::path::has_filename, std::filesystem::path::has_stem, std::filesystem::path::has_extension
来自cppreference.com
< cpp | filesystem | path
文件系统库
类 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
函数 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
文件类型 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::filesystem::path
常量 | |||||||||||||||||||||
成员函数 | |||||||||||||||||||||
|
|||||||||||||||||||||
路径分解 | |||||||||||||||||||||
|
|||||||||||||||||||||
非成员函数 | |||||||||||||||||||||
|
|||||||||||||||||||||
辅助类 | |||||||||||||||||||||
bool
has_root_path()
const;
|
(1) | (C++17 起) |
bool
has_root_name()
const;
|
(2) | (C++17 起) |
bool
has_root_directory()
const;
|
(3) | (C++17 起) |
bool
has_relative_path()
const;
|
(4) | (C++17 起) |
bool
has_parent_path()
const;
|
(5) | (C++17 起) |
bool
has_filename()
const;
|
(6) | (C++17 起) |
bool
has_stem()
const;
|
(7) | (C++17 起) |
bool
has_extension()
const;
|
(8) | (C++17 起) |
检查路径是否含有相应路径元素。
1) 检查 root_path()
是否为空。
2) 检查 root_name()
是否为空。
3) 检查 root_directory()
是否为空。
4) 检查 relative_path()
是否为空。
5) 检查 parent_path()
是否为空。
6) 检查 filename()
是否为空。
7) 检查 stem() 是否为空。
8) 检查 extension()
是否为空。
参数
(无)
返回值
若对应路径组分为非空则返回 true ,否则返回 false 。
异常
可能会抛出由实现定义的异常。
参阅
检查路径是否为空 (公开成员函数) |