Share via


<filesystem> 연산자

연산자는 문자열로 두 경로의 어휘 비교를 수행합니다. 함수를 equivalent 사용하여 두 경로(예: 상대 경로 및 절대 경로)가 디스크의 동일한 파일 또는 디렉터리를 참조하는지 여부를 확인합니다.

자세한 내용은 파일 시스템 탐색(C++)을 참조하세요.

연산자==

bool operator==(const path& left, const path& right) noexcept;

함수는 left.native() == right.native()를 반환합니다.

operator!=

bool operator!=(const path& left, const path& right) noexcept;

함수는 !(left == right)를 반환합니다.

operator<

bool operator<(const path& left, const path& right) noexcept;

함수는 left.native() < right.native()를 반환합니다.

operator<=

bool operator<=(const path& left, const path& right) noexcept;

함수는 !(right < left)를 반환합니다.

operator>

bool operator>(const path& left, const path& right) noexcept;

함수는 right < left를 반환합니다.

operator>=

bool operator>=(const path& left, const path& right) noexcept;

함수는 ! (왼쪽 < 오른쪽).

operator/

path operator/(const path& left, const path& right);

함수는 다음을 실행합니다.

basic_string<Elem, Traits> str;
path ans = left;
return (ans /= right);

operator<<

template <class Elem, class Traits>
basic_ostream<Elem, Traits>& operator<<(basic_ostream<Elem, Traits>& os, const path& pval);

함수는 os << pval.string<Elem, Traits()를 반환합니다>.

operator>>

template <class Elem, class Traits>
basic_istream<Elem, Traits>& operator<<(basic_istream<Elem, Traits>& is, const path& pval);

함수는 다음을 실행합니다.

basic_string<Elem, Traits> str;
is>> str;
pval = str;
return (is);