Important
<experimental/filesystem> ヘッダーと std::experimental::filesystem 名前空間は、ファイル システム技術仕様 (TS) の事前標準実装を提供しました。 このドキュメントは、MSVC バージョン 14.51 以降で削除された MSVC の元のファイルシステム実装に対して記述されたコードに関して保持されます。 新しいコードでは、代わりに C++17 <filesystem> ヘッダーと std::filesystem 名前空間を使用します。 これらの演算子の標準的な同等の演算子については、 <filesystem> 演算子を参照してください。
std::experimental::filesystem::pathのこれらの非メンバー演算子は、履歴<experimental/filesystem>ヘッダーで宣言されます。 比較演算子は、生の文字列ではなく、 path::compareを使用して、要素ごとに 2 つのパス要素をジェネリック形式で比較します。
equivalent関数を使用して、2 つのパス (相対パスや絶対パスなど) がディスク上の同じファイルまたはディレクトリを参照しているかどうかを判断します。
詳細については、「 ファイル システム ナビゲーション (C++)」を参照してください。
Requirements
ヘッダー: <experimental/filesystem>
名前 空間:std::experimental::filesystem
operator==
bool operator==(const path& left, const path& right) noexcept;
関数は left.compare(right) == 0を返します。
operator!=
bool operator!=(const path& left, const path& right) noexcept;
関数は !(left == right)を返します。
operator<
bool operator<(const path& left, const path& right) noexcept;
関数は left.compare(right) < 0を返します。
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)を返します。
オペレーター
path operator/(const path& left, const path& right);
関数は path(left) /= 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, path& pval);
この関数はストリームから文字列を抽出し、 pvalに割り当てます。 次のコマンドが実行されます。
basic_string<Elem, Traits> str;
is >> str;
pval = str;
return is;
こちらも参照ください
<experimental/filesystem>
<experimental/filesystem>
関数
<experimental/filesystem> 列挙型