std::experimental::filesystem::path::begin, std::experimental::filesystem::path::end
From cppreference.com
< 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) | (filesystem TS) |
| iterator end() const; |
(2) | (filesystem TS) |
1) Returns an iterator to the first element of the path. If the path is empty, the returned iterator is equal to end().
2) Returns an iterator one past the last element of the path. Dereferencing this iterator is undefined behavior.
The sequence denoted by this pair of iterators consists of the following:
1) root-name (if any).
2) root-directory (if any).
3) Sequence of file-names, omitting any directory separators.
4) If there is a directory separator after the last file-name in the path, the last element before the end iterator is a fictitious dot file name.
Contents |
[edit] Parameters
(none)
[edit] Return value
1) Iterator to the first element of the path.
2) Iterator one past the end of the path.
[edit] Exceptions
May throw implementation-defined exceptions.
[edit] Example
Run this code
Output:
Examining the path "C:\users\abcdef\AppData\Local\Temp\" through iterators gives "C:" "/" "users" "abcdef" "AppData" "Local" "Temp" "."