146035553Spatrick// -*- C++ -*- 2*4bdff4beSrobert//===----------------------------------------------------------------------===// 346035553Spatrick// 446035553Spatrick// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 546035553Spatrick// See https://llvm.org/LICENSE.txt for license information. 646035553Spatrick// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 746035553Spatrick// 846035553Spatrick//===----------------------------------------------------------------------===// 9*4bdff4beSrobert 1046035553Spatrick#ifndef _LIBCPP_FILESYSTEM 1146035553Spatrick#define _LIBCPP_FILESYSTEM 12*4bdff4beSrobert 1346035553Spatrick/* 1446035553Spatrick filesystem synopsis 1546035553Spatrick 16*4bdff4beSrobert namespace std::filesystem { 1746035553Spatrick 18*4bdff4beSrobert // `class path` from http://eel.is/c++draft/fs.class.path.general#6 19*4bdff4beSrobert class path { 20*4bdff4beSrobert public: 21*4bdff4beSrobert using value_type = see below; 22*4bdff4beSrobert using string_type = basic_string<value_type>; 23*4bdff4beSrobert static constexpr value_type preferred_separator = see below; 2446035553Spatrick 25*4bdff4beSrobert enum format; 2646035553Spatrick 27*4bdff4beSrobert path() noexcept; 28*4bdff4beSrobert path(const path& p); 29*4bdff4beSrobert path(path&& p) noexcept; 30*4bdff4beSrobert path(string_type&& source, format fmt = auto_format); 31*4bdff4beSrobert template<class Source> 32*4bdff4beSrobert path(const Source& source, format fmt = auto_format); 33*4bdff4beSrobert template<class InputIterator> 34*4bdff4beSrobert path(InputIterator first, InputIterator last, format fmt = auto_format); 35*4bdff4beSrobert template<class Source> 36*4bdff4beSrobert path(const Source& source, const locale& loc, format fmt = auto_format); 37*4bdff4beSrobert template<class InputIterator> 38*4bdff4beSrobert path(InputIterator first, InputIterator last, const locale& loc, format fmt = auto_format); 39*4bdff4beSrobert ~path(); 4046035553Spatrick 41*4bdff4beSrobert path& operator=(const path& p); 42*4bdff4beSrobert path& operator=(path&& p) noexcept; 43*4bdff4beSrobert path& operator=(string_type&& source); 44*4bdff4beSrobert path& assign(string_type&& source); 45*4bdff4beSrobert template<class Source> 46*4bdff4beSrobert path& operator=(const Source& source); 47*4bdff4beSrobert template<class Source> 48*4bdff4beSrobert path& assign(const Source& source); 49*4bdff4beSrobert template<class InputIterator> 50*4bdff4beSrobert path& assign(InputIterator first, InputIterator last); 5146035553Spatrick 52*4bdff4beSrobert path& operator/=(const path& p); 53*4bdff4beSrobert template<class Source> 54*4bdff4beSrobert path& operator/=(const Source& source); 55*4bdff4beSrobert template<class Source> 56*4bdff4beSrobert path& append(const Source& source); 57*4bdff4beSrobert template<class InputIterator> 58*4bdff4beSrobert path& append(InputIterator first, InputIterator last); 59*4bdff4beSrobert 60*4bdff4beSrobert path& operator+=(const path& x); 61*4bdff4beSrobert path& operator+=(const string_type& x); 62*4bdff4beSrobert path& operator+=(basic_string_view<value_type> x); 63*4bdff4beSrobert path& operator+=(const value_type* x); 64*4bdff4beSrobert path& operator+=(value_type x); 65*4bdff4beSrobert template<class Source> 66*4bdff4beSrobert path& operator+=(const Source& x); 67*4bdff4beSrobert template<class EcharT> 68*4bdff4beSrobert path& operator+=(EcharT x); 69*4bdff4beSrobert template<class Source> 70*4bdff4beSrobert path& concat(const Source& x); 71*4bdff4beSrobert template<class InputIterator> 72*4bdff4beSrobert path& concat(InputIterator first, InputIterator last); 73*4bdff4beSrobert 74*4bdff4beSrobert void clear() noexcept; 75*4bdff4beSrobert path& make_preferred(); 76*4bdff4beSrobert path& remove_filename(); 77*4bdff4beSrobert path& replace_filename(const path& replacement); 78*4bdff4beSrobert path& replace_extension(const path& replacement = path()); 79*4bdff4beSrobert void swap(path& rhs) noexcept; 80*4bdff4beSrobert 81*4bdff4beSrobert friend bool operator==(const path& lhs, const path& rhs) noexcept; 82*4bdff4beSrobert friend bool operator!=(const path& lhs, const path& rhs) noexcept; // removed in C++20 83*4bdff4beSrobert friend bool operator< (const path& lhs, const path& rhs) noexcept; // removed in C++20 84*4bdff4beSrobert friend bool operator<=(const path& lhs, const path& rhs) noexcept; // removed in C++20 85*4bdff4beSrobert friend bool operator> (const path& lhs, const path& rhs) noexcept; // removed in C++20 86*4bdff4beSrobert friend bool operator>=(const path& lhs, const path& rhs) noexcept; // removed in C++20 87*4bdff4beSrobert friend strong_ordering operator<=>(const path& lhs, const path& rhs) noexcept; // C++20 88*4bdff4beSrobert 89*4bdff4beSrobert friend path operator/(const path& lhs, const path& rhs); 90*4bdff4beSrobert 91*4bdff4beSrobert const string_type& native() const noexcept; 92*4bdff4beSrobert const value_type* c_str() const noexcept; 93*4bdff4beSrobert operator string_type() const; 94*4bdff4beSrobert 95*4bdff4beSrobert template<class EcharT, class traits = char_traits<EcharT>, 96*4bdff4beSrobert class Allocator = allocator<EcharT>> 97*4bdff4beSrobert basic_string<EcharT, traits, Allocator> 98*4bdff4beSrobert string(const Allocator& a = Allocator()) const; 99*4bdff4beSrobert std::string string() const; 100*4bdff4beSrobert std::wstring wstring() const; 101*4bdff4beSrobert std::u8string u8string() const; 102*4bdff4beSrobert std::u16string u16string() const; 103*4bdff4beSrobert std::u32string u32string() const; 104*4bdff4beSrobert 105*4bdff4beSrobert template<class EcharT, class traits = char_traits<EcharT>, 106*4bdff4beSrobert class Allocator = allocator<EcharT>> 107*4bdff4beSrobert basic_string<EcharT, traits, Allocator> 108*4bdff4beSrobert generic_string(const Allocator& a = Allocator()) const; 109*4bdff4beSrobert std::string generic_string() const; 110*4bdff4beSrobert std::wstring generic_wstring() const; 111*4bdff4beSrobert std::u8string generic_u8string() const; 112*4bdff4beSrobert std::u16string generic_u16string() const; 113*4bdff4beSrobert std::u32string generic_u32string() const; 114*4bdff4beSrobert 115*4bdff4beSrobert int compare(const path& p) const noexcept; 116*4bdff4beSrobert int compare(const string_type& s) const; 117*4bdff4beSrobert int compare(basic_string_view<value_type> s) const; 118*4bdff4beSrobert int compare(const value_type* s) const; 119*4bdff4beSrobert 120*4bdff4beSrobert path root_name() const; 121*4bdff4beSrobert path root_directory() const; 122*4bdff4beSrobert path root_path() const; 123*4bdff4beSrobert path relative_path() const; 124*4bdff4beSrobert path parent_path() const; 125*4bdff4beSrobert path filename() const; 126*4bdff4beSrobert path stem() const; 127*4bdff4beSrobert path extension() const; 128*4bdff4beSrobert 129*4bdff4beSrobert [[nodiscard]] bool empty() const noexcept; 130*4bdff4beSrobert bool has_root_name() const; 131*4bdff4beSrobert bool has_root_directory() const; 132*4bdff4beSrobert bool has_root_path() const; 133*4bdff4beSrobert bool has_relative_path() const; 134*4bdff4beSrobert bool has_parent_path() const; 135*4bdff4beSrobert bool has_filename() const; 136*4bdff4beSrobert bool has_stem() const; 137*4bdff4beSrobert bool has_extension() const; 138*4bdff4beSrobert bool is_absolute() const; 139*4bdff4beSrobert bool is_relative() const; 140*4bdff4beSrobert 141*4bdff4beSrobert path lexically_normal() const; 142*4bdff4beSrobert path lexically_relative(const path& base) const; 143*4bdff4beSrobert path lexically_proximate(const path& base) const; 144*4bdff4beSrobert 145*4bdff4beSrobert class iterator; 146*4bdff4beSrobert using const_iterator = iterator; 147*4bdff4beSrobert 148*4bdff4beSrobert iterator begin() const; 149*4bdff4beSrobert iterator end() const; 150*4bdff4beSrobert 15146035553Spatrick template<class charT, class traits> 15246035553Spatrick friend basic_ostream<charT, traits>& 15346035553Spatrick operator<<(basic_ostream<charT, traits>& os, const path& p); 15446035553Spatrick template<class charT, class traits> 15546035553Spatrick friend basic_istream<charT, traits>& 15646035553Spatrick operator>>(basic_istream<charT, traits>& is, path& p); 157*4bdff4beSrobert }; 158*4bdff4beSrobert 159*4bdff4beSrobert void swap(path& lhs, path& rhs) noexcept; 160*4bdff4beSrobert size_t hash_value(const path& p) noexcept; 16146035553Spatrick 16246035553Spatrick template <class Source> 16346035553Spatrick path u8path(const Source& source); 16446035553Spatrick template <class InputIterator> 16546035553Spatrick path u8path(InputIterator first, InputIterator last); 16646035553Spatrick 16746035553Spatrick class filesystem_error; 168*4bdff4beSrobert 169*4bdff4beSrobert class directory_entry { 170*4bdff4beSrobert public: 171*4bdff4beSrobert directory_entry() noexcept = default; 172*4bdff4beSrobert directory_entry(const directory_entry&) = default; 173*4bdff4beSrobert directory_entry(directory_entry&&) noexcept = default; 174*4bdff4beSrobert explicit directory_entry(const filesystem::path& p); 175*4bdff4beSrobert directory_entry(const filesystem::path& p, error_code& ec); 176*4bdff4beSrobert ~directory_entry(); 177*4bdff4beSrobert 178*4bdff4beSrobert directory_entry& operator=(const directory_entry&) = default; 179*4bdff4beSrobert directory_entry& operator=(directory_entry&&) noexcept = default; 180*4bdff4beSrobert 181*4bdff4beSrobert void assign(const filesystem::path& p); 182*4bdff4beSrobert void assign(const filesystem::path& p, error_code& ec); 183*4bdff4beSrobert void replace_filename(const filesystem::path& p); 184*4bdff4beSrobert void replace_filename(const filesystem::path& p, error_code& ec); 185*4bdff4beSrobert void refresh(); 186*4bdff4beSrobert void refresh(error_code& ec) noexcept; 187*4bdff4beSrobert 188*4bdff4beSrobert const filesystem::path& path() const noexcept; 189*4bdff4beSrobert operator const filesystem::path&() const noexcept; 190*4bdff4beSrobert bool exists() const; 191*4bdff4beSrobert bool exists(error_code& ec) const noexcept; 192*4bdff4beSrobert bool is_block_file() const; 193*4bdff4beSrobert bool is_block_file(error_code& ec) const noexcept; 194*4bdff4beSrobert bool is_character_file() const; 195*4bdff4beSrobert bool is_character_file(error_code& ec) const noexcept; 196*4bdff4beSrobert bool is_directory() const; 197*4bdff4beSrobert bool is_directory(error_code& ec) const noexcept; 198*4bdff4beSrobert bool is_fifo() const; 199*4bdff4beSrobert bool is_fifo(error_code& ec) const noexcept; 200*4bdff4beSrobert bool is_other() const; 201*4bdff4beSrobert bool is_other(error_code& ec) const noexcept; 202*4bdff4beSrobert bool is_regular_file() const; 203*4bdff4beSrobert bool is_regular_file(error_code& ec) const noexcept; 204*4bdff4beSrobert bool is_socket() const; 205*4bdff4beSrobert bool is_socket(error_code& ec) const noexcept; 206*4bdff4beSrobert bool is_symlink() const; 207*4bdff4beSrobert bool is_symlink(error_code& ec) const noexcept; 208*4bdff4beSrobert uintmax_t file_size() const; 209*4bdff4beSrobert uintmax_t file_size(error_code& ec) const noexcept; 210*4bdff4beSrobert uintmax_t hard_link_count() const; 211*4bdff4beSrobert uintmax_t hard_link_count(error_code& ec) const noexcept; 212*4bdff4beSrobert file_time_type last_write_time() const; 213*4bdff4beSrobert file_time_type last_write_time(error_code& ec) const noexcept; 214*4bdff4beSrobert file_status status() const; 215*4bdff4beSrobert file_status status(error_code& ec) const noexcept; 216*4bdff4beSrobert file_status symlink_status() const; 217*4bdff4beSrobert file_status symlink_status(error_code& ec) const noexcept; 218*4bdff4beSrobert 219*4bdff4beSrobert bool operator==(const directory_entry& rhs) const noexcept; 220*4bdff4beSrobert bool operator!=(const directory_entry& rhs) const noexcept; // removed in C++20 221*4bdff4beSrobert bool operator< (const directory_entry& rhs) const noexcept; // removed in C++20 222*4bdff4beSrobert bool operator<=(const directory_entry& rhs) const noexcept; // removed in C++20 223*4bdff4beSrobert bool operator> (const directory_entry& rhs) const noexcept; // removed in C++20 224*4bdff4beSrobert bool operator>=(const directory_entry& rhs) const noexcept; // removed in C++20 225*4bdff4beSrobert strong_ordering operator<=>(const directory_entry& rhs) const noexcept; // since C++20 226*4bdff4beSrobert 227*4bdff4beSrobert template<class charT, class traits> 228*4bdff4beSrobert friend basic_ostream<charT, traits>& 229*4bdff4beSrobert operator<<(basic_ostream<charT, traits>& os, const directory_entry& d); 230*4bdff4beSrobert 231*4bdff4beSrobert private: 232*4bdff4beSrobert filesystem::path pathobject; // exposition only 233*4bdff4beSrobert friend class directory_iterator; // exposition only 234*4bdff4beSrobert }; 23546035553Spatrick 23646035553Spatrick class directory_iterator; 23746035553Spatrick 23846035553Spatrick // enable directory_iterator range-based for statements 23946035553Spatrick directory_iterator begin(directory_iterator iter) noexcept; 240*4bdff4beSrobert directory_iterator end(directory_iterator) noexcept; 24146035553Spatrick 24246035553Spatrick class recursive_directory_iterator; 24346035553Spatrick 24446035553Spatrick // enable recursive_directory_iterator range-based for statements 24546035553Spatrick recursive_directory_iterator begin(recursive_directory_iterator iter) noexcept; 246*4bdff4beSrobert recursive_directory_iterator end(recursive_directory_iterator) noexcept; 24746035553Spatrick 24846035553Spatrick class file_status; 24946035553Spatrick 25046035553Spatrick struct space_info 25146035553Spatrick { 25246035553Spatrick uintmax_t capacity; 25346035553Spatrick uintmax_t free; 25446035553Spatrick uintmax_t available; 255*4bdff4beSrobert 256*4bdff4beSrobert friend bool operator==(const space_info&, const space_info&) = default; // C++20 25746035553Spatrick }; 25846035553Spatrick 25946035553Spatrick enum class file_type; 26046035553Spatrick enum class perms; 26146035553Spatrick enum class perm_options; 26246035553Spatrick enum class copy_options; 26346035553Spatrick enum class directory_options; 26446035553Spatrick 26546035553Spatrick typedef chrono::time_point<trivial-clock> file_time_type; 26646035553Spatrick 26746035553Spatrick // operational functions 26846035553Spatrick 26946035553Spatrick path absolute(const path& p); 27046035553Spatrick path absolute(const path& p, error_code &ec); 27146035553Spatrick 27246035553Spatrick path canonical(const path& p); 27346035553Spatrick path canonical(const path& p, error_code& ec); 27446035553Spatrick 27546035553Spatrick void copy(const path& from, const path& to); 27646035553Spatrick void copy(const path& from, const path& to, error_code& ec); 27746035553Spatrick void copy(const path& from, const path& to, copy_options options); 27846035553Spatrick void copy(const path& from, const path& to, copy_options options, 27946035553Spatrick error_code& ec); 28046035553Spatrick 28146035553Spatrick bool copy_file(const path& from, const path& to); 28246035553Spatrick bool copy_file(const path& from, const path& to, error_code& ec); 28346035553Spatrick bool copy_file(const path& from, const path& to, copy_options option); 28446035553Spatrick bool copy_file(const path& from, const path& to, copy_options option, 28546035553Spatrick error_code& ec); 28646035553Spatrick 28746035553Spatrick void copy_symlink(const path& existing_symlink, const path& new_symlink); 28846035553Spatrick void copy_symlink(const path& existing_symlink, const path& new_symlink, 28946035553Spatrick error_code& ec) noexcept; 29046035553Spatrick 29146035553Spatrick bool create_directories(const path& p); 29246035553Spatrick bool create_directories(const path& p, error_code& ec); 29346035553Spatrick 29446035553Spatrick bool create_directory(const path& p); 29546035553Spatrick bool create_directory(const path& p, error_code& ec) noexcept; 29646035553Spatrick 29746035553Spatrick bool create_directory(const path& p, const path& attributes); 29846035553Spatrick bool create_directory(const path& p, const path& attributes, 29946035553Spatrick error_code& ec) noexcept; 30046035553Spatrick 30146035553Spatrick void create_directory_symlink(const path& to, const path& new_symlink); 30246035553Spatrick void create_directory_symlink(const path& to, const path& new_symlink, 30346035553Spatrick error_code& ec) noexcept; 30446035553Spatrick 30546035553Spatrick void create_hard_link(const path& to, const path& new_hard_link); 30646035553Spatrick void create_hard_link(const path& to, const path& new_hard_link, 30746035553Spatrick error_code& ec) noexcept; 30846035553Spatrick 30946035553Spatrick void create_symlink(const path& to, const path& new_symlink); 31046035553Spatrick void create_symlink(const path& to, const path& new_symlink, 31146035553Spatrick error_code& ec) noexcept; 31246035553Spatrick 31346035553Spatrick path current_path(); 31446035553Spatrick path current_path(error_code& ec); 31546035553Spatrick void current_path(const path& p); 31646035553Spatrick void current_path(const path& p, error_code& ec) noexcept; 31746035553Spatrick 31846035553Spatrick bool exists(file_status s) noexcept; 31946035553Spatrick bool exists(const path& p); 32046035553Spatrick bool exists(const path& p, error_code& ec) noexcept; 32146035553Spatrick 32246035553Spatrick bool equivalent(const path& p1, const path& p2); 32346035553Spatrick bool equivalent(const path& p1, const path& p2, error_code& ec) noexcept; 32446035553Spatrick 32546035553Spatrick uintmax_t file_size(const path& p); 32646035553Spatrick uintmax_t file_size(const path& p, error_code& ec) noexcept; 32746035553Spatrick 32846035553Spatrick uintmax_t hard_link_count(const path& p); 32946035553Spatrick uintmax_t hard_link_count(const path& p, error_code& ec) noexcept; 33046035553Spatrick 33146035553Spatrick bool is_block_file(file_status s) noexcept; 33246035553Spatrick bool is_block_file(const path& p); 33346035553Spatrick bool is_block_file(const path& p, error_code& ec) noexcept; 33446035553Spatrick 33546035553Spatrick bool is_character_file(file_status s) noexcept; 33646035553Spatrick bool is_character_file(const path& p); 33746035553Spatrick bool is_character_file(const path& p, error_code& ec) noexcept; 33846035553Spatrick 33946035553Spatrick bool is_directory(file_status s) noexcept; 34046035553Spatrick bool is_directory(const path& p); 34146035553Spatrick bool is_directory(const path& p, error_code& ec) noexcept; 34246035553Spatrick 34346035553Spatrick bool is_empty(const path& p); 34446035553Spatrick bool is_empty(const path& p, error_code& ec) noexcept; 34546035553Spatrick 34646035553Spatrick bool is_fifo(file_status s) noexcept; 34746035553Spatrick bool is_fifo(const path& p); 34846035553Spatrick bool is_fifo(const path& p, error_code& ec) noexcept; 34946035553Spatrick 35046035553Spatrick bool is_other(file_status s) noexcept; 35146035553Spatrick bool is_other(const path& p); 35246035553Spatrick bool is_other(const path& p, error_code& ec) noexcept; 35346035553Spatrick 35446035553Spatrick bool is_regular_file(file_status s) noexcept; 35546035553Spatrick bool is_regular_file(const path& p); 35646035553Spatrick bool is_regular_file(const path& p, error_code& ec) noexcept; 35746035553Spatrick 35846035553Spatrick bool is_socket(file_status s) noexcept; 35946035553Spatrick bool is_socket(const path& p); 36046035553Spatrick bool is_socket(const path& p, error_code& ec) noexcept; 36146035553Spatrick 36246035553Spatrick bool is_symlink(file_status s) noexcept; 36346035553Spatrick bool is_symlink(const path& p); 36446035553Spatrick bool is_symlink(const path& p, error_code& ec) noexcept; 36546035553Spatrick 36646035553Spatrick file_time_type last_write_time(const path& p); 36746035553Spatrick file_time_type last_write_time(const path& p, error_code& ec) noexcept; 36846035553Spatrick void last_write_time(const path& p, file_time_type new_time); 36946035553Spatrick void last_write_time(const path& p, file_time_type new_time, 37046035553Spatrick error_code& ec) noexcept; 37146035553Spatrick 37246035553Spatrick void permissions(const path& p, perms prms, 37346035553Spatrick perm_options opts=perm_options::replace); 37446035553Spatrick void permissions(const path& p, perms prms, error_code& ec) noexcept; 37546035553Spatrick void permissions(const path& p, perms prms, perm_options opts, 37646035553Spatrick error_code& ec); 37746035553Spatrick 37846035553Spatrick path proximate(const path& p, error_code& ec); 37946035553Spatrick path proximate(const path& p, const path& base = current_path()); 38046035553Spatrick path proximate(const path& p, const path& base, error_code &ec); 38146035553Spatrick 38246035553Spatrick path read_symlink(const path& p); 38346035553Spatrick path read_symlink(const path& p, error_code& ec); 38446035553Spatrick 38546035553Spatrick path relative(const path& p, error_code& ec); 38646035553Spatrick path relative(const path& p, const path& base=current_path()); 38746035553Spatrick path relative(const path& p, const path& base, error_code& ec); 38846035553Spatrick 38946035553Spatrick bool remove(const path& p); 39046035553Spatrick bool remove(const path& p, error_code& ec) noexcept; 39146035553Spatrick 39246035553Spatrick uintmax_t remove_all(const path& p); 39346035553Spatrick uintmax_t remove_all(const path& p, error_code& ec); 39446035553Spatrick 39546035553Spatrick void rename(const path& from, const path& to); 39646035553Spatrick void rename(const path& from, const path& to, error_code& ec) noexcept; 39746035553Spatrick 39846035553Spatrick void resize_file(const path& p, uintmax_t size); 39946035553Spatrick void resize_file(const path& p, uintmax_t size, error_code& ec) noexcept; 40046035553Spatrick 40146035553Spatrick space_info space(const path& p); 40246035553Spatrick space_info space(const path& p, error_code& ec) noexcept; 40346035553Spatrick 40446035553Spatrick file_status status(const path& p); 40546035553Spatrick file_status status(const path& p, error_code& ec) noexcept; 40646035553Spatrick 40746035553Spatrick bool status_known(file_status s) noexcept; 40846035553Spatrick 40946035553Spatrick file_status symlink_status(const path& p); 41046035553Spatrick file_status symlink_status(const path& p, error_code& ec) noexcept; 41146035553Spatrick 41246035553Spatrick path temp_directory_path(); 41346035553Spatrick path temp_directory_path(error_code& ec); 41446035553Spatrick 41546035553Spatrick path weakly_canonical(path const& p); 41646035553Spatrick path weakly_canonical(path const& p, error_code& ec); 41746035553Spatrick 418*4bdff4beSrobert} // namespace std::filesystem 41946035553Spatrick 420*4bdff4beSroberttemplate <> 421*4bdff4beSrobertinline constexpr bool std::ranges::enable_borrowed_range<std::filesystem::directory_iterator> = true; 422*4bdff4beSroberttemplate <> 423*4bdff4beSrobertinline constexpr bool std::ranges::enable_borrowed_range<std::filesystem::recursive_directory_iterator> = true; 424*4bdff4beSrobert 425*4bdff4beSroberttemplate <> 426*4bdff4beSrobertinline constexpr bool std::ranges::enable_view<std::filesystem::directory_iterator> = true; 427*4bdff4beSroberttemplate <> 428*4bdff4beSrobertinline constexpr bool std::ranges::enable_view<std::filesystem::recursive_directory_iterator> = true; 42946035553Spatrick 43046035553Spatrick*/ 43146035553Spatrick 432*4bdff4beSrobert#include <__assert> // all public C++ headers provide the assertion handler 43346035553Spatrick#include <__config> 434*4bdff4beSrobert#include <__filesystem/copy_options.h> 435*4bdff4beSrobert#include <__filesystem/directory_entry.h> 436*4bdff4beSrobert#include <__filesystem/directory_iterator.h> 437*4bdff4beSrobert#include <__filesystem/directory_options.h> 438*4bdff4beSrobert#include <__filesystem/file_status.h> 439*4bdff4beSrobert#include <__filesystem/file_time_type.h> 440*4bdff4beSrobert#include <__filesystem/file_type.h> 441*4bdff4beSrobert#include <__filesystem/filesystem_error.h> 442*4bdff4beSrobert#include <__filesystem/operations.h> 443*4bdff4beSrobert#include <__filesystem/path.h> 444*4bdff4beSrobert#include <__filesystem/path_iterator.h> 445*4bdff4beSrobert#include <__filesystem/perm_options.h> 446*4bdff4beSrobert#include <__filesystem/perms.h> 447*4bdff4beSrobert#include <__filesystem/recursive_directory_iterator.h> 448*4bdff4beSrobert#include <__filesystem/space_info.h> 449*4bdff4beSrobert#include <__filesystem/u8path.h> 45046035553Spatrick#include <version> 45146035553Spatrick 452*4bdff4beSrobert// standard-mandated includes 453*4bdff4beSrobert 454*4bdff4beSrobert// [fs.filesystem.syn] 455*4bdff4beSrobert#include <compare> 45676d0caaeSpatrick 45776d0caaeSpatrick#if defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY) 458*4bdff4beSrobert# error "The <filesystem> library is not supported since libc++ has been configured without support for a filesystem." 45976d0caaeSpatrick#endif 46046035553Spatrick 46146035553Spatrick#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 46246035553Spatrick# pragma GCC system_header 46346035553Spatrick#endif 46446035553Spatrick 465*4bdff4beSrobert#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 466*4bdff4beSrobert# include <concepts> 46776d0caaeSpatrick#endif 46846035553Spatrick 46946035553Spatrick#endif // _LIBCPP_FILESYSTEM 470