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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
### Header `<filesystem>` synopsis <a id="fs.filesystem.syn">[[fs.filesystem.syn]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
namespace std::filesystem {
|
| 5 |
+
// [fs.class.path], paths
|
| 6 |
+
class path;
|
| 7 |
+
|
| 8 |
+
// [fs.path.nonmember], path non-member functions
|
| 9 |
+
void swap(path& lhs, path& rhs) noexcept;
|
| 10 |
+
size_t hash_value(const path& p) noexcept;
|
| 11 |
+
|
| 12 |
+
bool operator==(const path& lhs, const path& rhs) noexcept;
|
| 13 |
+
bool operator!=(const path& lhs, const path& rhs) noexcept;
|
| 14 |
+
bool operator< (const path& lhs, const path& rhs) noexcept;
|
| 15 |
+
bool operator<=(const path& lhs, const path& rhs) noexcept;
|
| 16 |
+
bool operator> (const path& lhs, const path& rhs) noexcept;
|
| 17 |
+
bool operator>=(const path& lhs, const path& rhs) noexcept;
|
| 18 |
+
|
| 19 |
+
path operator/ (const path& lhs, const path& rhs);
|
| 20 |
+
|
| 21 |
+
// [fs.path.io], path inserter and extractor
|
| 22 |
+
template <class charT, class traits>
|
| 23 |
+
basic_ostream<charT, traits>&
|
| 24 |
+
operator<<(basic_ostream<charT, traits>& os, const path& p);
|
| 25 |
+
template <class charT, class traits>
|
| 26 |
+
basic_istream<charT, traits>&
|
| 27 |
+
operator>>(basic_istream<charT, traits>& is, path& p);
|
| 28 |
+
|
| 29 |
+
// [fs.path.factory], path factory functions
|
| 30 |
+
template <class Source>
|
| 31 |
+
path u8path(const Source& source);
|
| 32 |
+
template <class InputIterator>
|
| 33 |
+
path u8path(InputIterator first, InputIterator last);
|
| 34 |
+
|
| 35 |
+
// [fs.class.filesystem_error], filesystem errors
|
| 36 |
+
class filesystem_error;
|
| 37 |
+
|
| 38 |
+
// [fs.class.directory_entry], directory entries
|
| 39 |
+
class directory_entry;
|
| 40 |
+
|
| 41 |
+
// [fs.class.directory_iterator], directory iterators
|
| 42 |
+
class directory_iterator;
|
| 43 |
+
|
| 44 |
+
// [fs.dir.itr.nonmembers], range access for directory iterators
|
| 45 |
+
directory_iterator begin(directory_iterator iter) noexcept;
|
| 46 |
+
directory_iterator end(const directory_iterator&) noexcept;
|
| 47 |
+
|
| 48 |
+
// [fs.class.rec.dir.itr], recursive directory iterators
|
| 49 |
+
class recursive_directory_iterator;
|
| 50 |
+
|
| 51 |
+
// [fs.rec.dir.itr.nonmembers], range access for recursive directory iterators
|
| 52 |
+
recursive_directory_iterator begin(recursive_directory_iterator iter) noexcept;
|
| 53 |
+
recursive_directory_iterator end(const recursive_directory_iterator&) noexcept;
|
| 54 |
+
|
| 55 |
+
// [fs.class.file_status], file status
|
| 56 |
+
class file_status;
|
| 57 |
+
|
| 58 |
+
struct space_info {
|
| 59 |
+
uintmax_t capacity;
|
| 60 |
+
uintmax_t free;
|
| 61 |
+
uintmax_t available;
|
| 62 |
+
};
|
| 63 |
+
|
| 64 |
+
// [fs.enum], enumerations
|
| 65 |
+
enum class file_type;
|
| 66 |
+
enum class perms;
|
| 67 |
+
enum class perm_options;
|
| 68 |
+
enum class copy_options;
|
| 69 |
+
enum class directory_options;
|
| 70 |
+
|
| 71 |
+
using file_time_type = chrono::time_point<trivial-clock>;
|
| 72 |
+
|
| 73 |
+
// [fs.op.funcs], filesystem operations
|
| 74 |
+
path absolute(const path& p, const path& base = current_path());
|
| 75 |
+
|
| 76 |
+
path canonical(const path& p, const path& base = current_path());
|
| 77 |
+
path canonical(const path& p, error_code& ec);
|
| 78 |
+
path canonical(const path& p, const path& base, error_code& ec);
|
| 79 |
+
|
| 80 |
+
void copy(const path& from, const path& to);
|
| 81 |
+
void copy(const path& from, const path& to, error_code& ec) noexcept;
|
| 82 |
+
void copy(const path& from, const path& to, copy_options options);
|
| 83 |
+
void copy(const path& from, const path& to, copy_options options,
|
| 84 |
+
error_code& ec) noexcept;
|
| 85 |
+
|
| 86 |
+
bool copy_file(const path& from, const path& to);
|
| 87 |
+
bool copy_file(const path& from, const path& to, error_code& ec) noexcept;
|
| 88 |
+
bool copy_file(const path& from, const path& to, copy_options option);
|
| 89 |
+
bool copy_file(const path& from, const path& to, copy_options option,
|
| 90 |
+
error_code& ec) noexcept;
|
| 91 |
+
|
| 92 |
+
void copy_symlink(const path& existing_symlink, const path& new_symlink);
|
| 93 |
+
void copy_symlink(const path& existing_symlink, const path& new_symlink,
|
| 94 |
+
error_code& ec) noexcept;
|
| 95 |
+
|
| 96 |
+
bool create_directories(const path& p);
|
| 97 |
+
bool create_directories(const path& p, error_code& ec) noexcept;
|
| 98 |
+
|
| 99 |
+
bool create_directory(const path& p);
|
| 100 |
+
bool create_directory(const path& p, error_code& ec) noexcept;
|
| 101 |
+
|
| 102 |
+
bool create_directory(const path& p, const path& attributes);
|
| 103 |
+
bool create_directory(const path& p, const path& attributes,
|
| 104 |
+
error_code& ec) noexcept;
|
| 105 |
+
|
| 106 |
+
void create_directory_symlink(const path& to, const path& new_symlink);
|
| 107 |
+
void create_directory_symlink(const path& to, const path& new_symlink,
|
| 108 |
+
error_code& ec) noexcept;
|
| 109 |
+
|
| 110 |
+
void create_hard_link(const path& to, const path& new_hard_link);
|
| 111 |
+
void create_hard_link(const path& to, const path& new_hard_link,
|
| 112 |
+
error_code& ec) noexcept;
|
| 113 |
+
|
| 114 |
+
void create_symlink(const path& to, const path& new_symlink);
|
| 115 |
+
void create_symlink(const path& to, const path& new_symlink,
|
| 116 |
+
error_code& ec) noexcept;
|
| 117 |
+
|
| 118 |
+
path current_path();
|
| 119 |
+
path current_path(error_code& ec);
|
| 120 |
+
void current_path(const path& p);
|
| 121 |
+
void current_path(const path& p, error_code& ec) noexcept;
|
| 122 |
+
|
| 123 |
+
bool exists(file_status s) noexcept;
|
| 124 |
+
bool exists(const path& p);
|
| 125 |
+
bool exists(const path& p, error_code& ec) noexcept;
|
| 126 |
+
|
| 127 |
+
bool equivalent(const path& p1, const path& p2);
|
| 128 |
+
bool equivalent(const path& p1, const path& p2, error_code& ec) noexcept;
|
| 129 |
+
|
| 130 |
+
uintmax_t file_size(const path& p);
|
| 131 |
+
uintmax_t file_size(const path& p, error_code& ec) noexcept;
|
| 132 |
+
|
| 133 |
+
uintmax_t hard_link_count(const path& p);
|
| 134 |
+
uintmax_t hard_link_count(const path& p, error_code& ec) noexcept;
|
| 135 |
+
|
| 136 |
+
bool is_block_file(file_status s) noexcept;
|
| 137 |
+
bool is_block_file(const path& p);
|
| 138 |
+
bool is_block_file(const path& p, error_code& ec) noexcept;
|
| 139 |
+
|
| 140 |
+
bool is_character_file(file_status s) noexcept;
|
| 141 |
+
bool is_character_file(const path& p);
|
| 142 |
+
bool is_character_file(const path& p, error_code& ec) noexcept;
|
| 143 |
+
|
| 144 |
+
bool is_directory(file_status s) noexcept;
|
| 145 |
+
bool is_directory(const path& p);
|
| 146 |
+
bool is_directory(const path& p, error_code& ec) noexcept;
|
| 147 |
+
|
| 148 |
+
bool is_empty(const path& p);
|
| 149 |
+
bool is_empty(const path& p, error_code& ec) noexcept;
|
| 150 |
+
|
| 151 |
+
bool is_fifo(file_status s) noexcept;
|
| 152 |
+
bool is_fifo(const path& p);
|
| 153 |
+
bool is_fifo(const path& p, error_code& ec) noexcept;
|
| 154 |
+
|
| 155 |
+
bool is_other(file_status s) noexcept;
|
| 156 |
+
bool is_other(const path& p);
|
| 157 |
+
bool is_other(const path& p, error_code& ec) noexcept;
|
| 158 |
+
|
| 159 |
+
bool is_regular_file(file_status s) noexcept;
|
| 160 |
+
bool is_regular_file(const path& p);
|
| 161 |
+
bool is_regular_file(const path& p, error_code& ec) noexcept;
|
| 162 |
+
|
| 163 |
+
bool is_socket(file_status s) noexcept;
|
| 164 |
+
bool is_socket(const path& p);
|
| 165 |
+
bool is_socket(const path& p, error_code& ec) noexcept;
|
| 166 |
+
|
| 167 |
+
bool is_symlink(file_status s) noexcept;
|
| 168 |
+
bool is_symlink(const path& p);
|
| 169 |
+
bool is_symlink(const path& p, error_code& ec) noexcept;
|
| 170 |
+
|
| 171 |
+
file_time_type last_write_time(const path& p);
|
| 172 |
+
file_time_type last_write_time(const path& p, error_code& ec) noexcept;
|
| 173 |
+
void last_write_time(const path& p, file_time_type new_time);
|
| 174 |
+
void last_write_time(const path& p, file_time_type new_time,
|
| 175 |
+
error_code& ec) noexcept;
|
| 176 |
+
|
| 177 |
+
void permissions(const path& p, perms prms, perm_options opts=perm_options::replace);
|
| 178 |
+
void permissions(const path& p, perms prms, error_code& ec) noexcept;
|
| 179 |
+
void permissions(const path& p, perms prms, perm_options opts, error_code& ec);
|
| 180 |
+
|
| 181 |
+
path proximate(const path& p, error_code& ec);
|
| 182 |
+
path proximate(const path& p, const path& base = current_path());
|
| 183 |
+
path proximate(const path& p, const path& base, error_code& ec);
|
| 184 |
+
|
| 185 |
+
path read_symlink(const path& p);
|
| 186 |
+
path read_symlink(const path& p, error_code& ec);
|
| 187 |
+
|
| 188 |
+
path relative(const path& p, error_code& ec);
|
| 189 |
+
path relative(const path& p, const path& base = current_path());
|
| 190 |
+
path relative(const path& p, const path& base, error_code& ec);
|
| 191 |
+
|
| 192 |
+
bool remove(const path& p);
|
| 193 |
+
bool remove(const path& p, error_code& ec) noexcept;
|
| 194 |
+
|
| 195 |
+
uintmax_t remove_all(const path& p);
|
| 196 |
+
uintmax_t remove_all(const path& p, error_code& ec) noexcept;
|
| 197 |
+
|
| 198 |
+
void rename(const path& from, const path& to);
|
| 199 |
+
void rename(const path& from, const path& to, error_code& ec) noexcept;
|
| 200 |
+
|
| 201 |
+
void resize_file(const path& p, uintmax_t size);
|
| 202 |
+
void resize_file(const path& p, uintmax_t size, error_code& ec) noexcept;
|
| 203 |
+
|
| 204 |
+
space_info space(const path& p);
|
| 205 |
+
space_info space(const path& p, error_code& ec) noexcept;
|
| 206 |
+
|
| 207 |
+
file_status status(const path& p);
|
| 208 |
+
file_status status(const path& p, error_code& ec) noexcept;
|
| 209 |
+
|
| 210 |
+
bool status_known(file_status s) noexcept;
|
| 211 |
+
|
| 212 |
+
file_status symlink_status(const path& p);
|
| 213 |
+
file_status symlink_status(const path& p, error_code& ec) noexcept;
|
| 214 |
+
|
| 215 |
+
path temp_directory_path();
|
| 216 |
+
path temp_directory_path(error_code& ec);
|
| 217 |
+
|
| 218 |
+
path weakly_canonical(const path& p);
|
| 219 |
+
path weakly_canonical(const path& p, error_code& ec);
|
| 220 |
+
}
|
| 221 |
+
```
|
| 222 |
+
|
| 223 |
+
`trivial-clock` is an *implementation-defined* type that satisfies the
|
| 224 |
+
`TrivialClock` requirements ([[time.clock.req]]) and that is capable of
|
| 225 |
+
representing and measuring file time values. Implementations should
|
| 226 |
+
ensure that the resolution and range of `file_time_type` reflect the
|
| 227 |
+
operating system dependent resolution and range of file time values.
|
| 228 |
+
|