| 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 |
| Classes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Functions | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| File types | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Member functions | ||||
| Path decomposition | ||||
| Non-member functions | ||||
operator/ | ||||
Defined in header <experimental/filesystem> | ||
path operator/(const path& lhs,const path& rhs); | (filesystem TS) | |
Concatenates two paths. Effectively returnspath(lhs)/= rhs.
Contents |
| lhs, rhs | - | paths to concatenate |
The result of path concatenation.
#include <experimental/filesystem>#include <iostream>namespace fs= std::experimental::filesystem; int main(){ fs::path p1="C:Users";std::cout<<"\"C:\" /\"Users\" == "<< p1<<'\n'; fs::path p2="batman"; fs::path p3= p1/ p2;// inserts fs::path::preferred_separator, '\' on Windowsstd::cout<<"\"C:\" /\"Users\" /\"batman\" == "<< p3<<'\n';}
Output:
"C:" / "Users" == "C:Users""C:" / "Users" / "batman" == "C:Users\batman"
| appends elements to the path (public member function)[edit] |