std::experimental::filesystem:: operator/ (std::experimental::filesystem::path)
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 | ||||
|
operator/
|
||||
|
헤더 파일에 정의됨
<experimental/filesystem>
|
||
|
path operator
/
(
const
path
&
lhs,
const
path
&
rhs
)
;
|
(filesystem TS) | |
두 경로를 연결합니다. 효과적으로 path ( lhs ) / = rhs 를 반환합니다.
목차 |
매개변수
| lhs, rhs | - | 연결할 경로 |
반환값
경로 결합의 결과입니다.
예외
noexcept
명세:
noexcept
예제
이 코드 실행
#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 Windows std::cout << "\"C:\" / \"Users\" / \"batman\" == " << p3 << '\n'; }
출력:
"C:" / "Users" == "C:Users" "C:" / "Users" / "batman" == "C:Users\batman"
참고 항목
|
경로에 요소들을 추가함
(public member function) |