std::experimental::filesystem::path:: begin, std::experimental::filesystem::path:: end
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 | ||||
|
iterator begin
(
)
const
;
|
(1) | (文件系统 TS) |
|
iterator end
(
)
const
;
|
(2) | (文件系统 TS) |
1)
返回指向路径第一个元素的迭代器。如果路径为空,返回的迭代器等于
end()
。
2)
返回指向路径最后一个元素之后位置的迭代器。解引用此迭代器将导致未定义行为。
该迭代器对所表示的序列包含以下内容:
1)
root-name
(如果存在)。
2)
根目录
(如果有)。
3)
省略所有目录分隔符的
file-name
序列。
4)
若路径中最后一个
file-name
后方存在目录分隔符,则结束迭代器前的最后一个元素是一个虚构的
dot
文件名。
目录 |
参数
(无)
返回值
1)
指向路径第一个元素的迭代器。
2)
指向路径末端之后位置的迭代器。
异常
可能抛出实现定义的异常。
示例
运行此代码
输出:
通过迭代器检查路径 "C:\users\abcdef\AppData\Local\Temp\" 得到 "C:" "/" "users" "abcdef" "AppData" "Local" "Temp" "."