std::experimental::filesystem::path:: is_absolute,is_relative
From cppreference.net
<
cpp
|
experimental
|
fs
|
path
C++
Experimental
| Technical Specification | ||||
| Filesystem library (filesystem TS) | ||||
| Library fundamentals (library fundamentals TS) | ||||
| Library fundamentals 2 (library fundamentals TS v2) | ||||
| Library fundamentals 3 (library fundamentals TS v3) | ||||
| Extensions for parallelism (parallelism TS) | ||||
| Extensions for parallelism 2 (parallelism TS v2) | ||||
| Extensions for concurrency (concurrency TS) | ||||
| Extensions for concurrency 2 (concurrency TS v2) | ||||
| Concepts (concepts TS) | ||||
| Ranges (ranges TS) | ||||
| Reflection (reflection TS) | ||||
| Mathematical special functions (special functions TR) | ||||
| Experimental Non-TS | ||||
| Pattern Matching | ||||
| Linear Algebra | ||||
| std::execution | ||||
| Contracts | ||||
| 2D Graphics |
Filesystem library
| Classes | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| File types | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
path
| Member functions | ||||
| Path decomposition | ||||
| Non-member functions | ||||
|
bool
is_absolute
(
)
const
;
|
(1) | (文件系统 TS) |
|
bool
is_relative
(
)
const
;
|
(2) | (文件系统 TS) |
检查路径是绝对路径还是相对路径。绝对路径是指 root_path ( ) 的元素能唯一确定文件系统位置的路径。第一个版本在路径为绝对路径时返回 true ,否则返回 false ;第二个版本则相反。
目录 |
参数
(无)
返回值
1)
true
若路径为绝对路径,
false
则为相对路径。
2)
false
表示路径为绝对路径,
true
则表示其他情况。
异常
可能抛出实现定义的异常。
参见
|
检查对应的路径元素是否非空
(公开成员函数) |