<filesystem> 演算子

演算子は、2 つのパスの構文を文字列として比較します。 equivalent 関数を使用して、2 つのパス (たとえば、相対パスと絶対パス) がディスク上の同じファイルまたはディレクトリを参照しているかどうかを確認します。

詳細については、「ファイル システムのナビゲーション」を参照してください。

operator==

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;

lleft.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;

!(left < right) が返されます。

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);