30#ifndef _GLIBCXX_FS_OPS_H
31#define _GLIBCXX_FS_OPS_H 1
33#if __cplusplus >= 201703L
37namespace std _GLIBCXX_VISIBILITY(default)
39_GLIBCXX_BEGIN_NAMESPACE_VERSION
48 path absolute(
const path& __p);
51 path absolute(
const path& __p, error_code& __ec);
54 path canonical(
const path& __p);
57 path canonical(
const path& __p, error_code& __ec);
60 copy(
const path& __from,
const path& __to)
61 { copy(__from, __to, copy_options::none); }
64 copy(
const path& __from,
const path& __to, error_code& __ec)
65 { copy(__from, __to, copy_options::none, __ec); }
67 void copy(
const path& __from,
const path& __to,
copy_options __options);
68 void copy(
const path& __from,
const path& __to,
copy_options __options,
72 copy_file(
const path& __from,
const path& __to)
73 {
return copy_file(__from, __to, copy_options::none); }
76 copy_file(
const path& __from,
const path& __to, error_code& __ec)
77 {
return copy_file(__from, __to, copy_options::none, __ec); }
79 bool copy_file(
const path& __from,
const path& __to,
copy_options __option);
80 bool copy_file(
const path& __from,
const path& __to,
copy_options __option,
83 void copy_symlink(
const path& __existing_symlink,
const path& __new_symlink);
84 void copy_symlink(
const path& __existing_symlink,
const path& __new_symlink,
85 error_code& __ec)
noexcept;
87 bool create_directories(
const path& __p);
88 bool create_directories(
const path& __p, error_code& __ec);
90 bool create_directory(
const path& __p);
91 bool create_directory(
const path& __p, error_code& __ec)
noexcept;
93 bool create_directory(
const path& __p,
const path& attributes);
94 bool create_directory(
const path& __p,
const path& attributes,
95 error_code& __ec)
noexcept;
97 void create_directory_symlink(
const path& __to,
const path& __new_symlink);
98 void create_directory_symlink(
const path& __to,
const path& __new_symlink,
99 error_code& __ec)
noexcept;
101 void create_hard_link(
const path& __to,
const path& __new_hard_link);
102 void create_hard_link(
const path& __to,
const path& __new_hard_link,
103 error_code& __ec)
noexcept;
105 void create_symlink(
const path& __to,
const path& __new_symlink);
106 void create_symlink(
const path& __to,
const path& __new_symlink,
107 error_code& __ec)
noexcept;
113 path current_path(error_code& __ec);
115 void current_path(
const path& __p);
116 void current_path(
const path& __p, error_code& __ec)
noexcept;
120 equivalent(
const path& __p1,
const path& __p2);
124 equivalent(
const path& __p1,
const path& __p2, error_code& __ec)
noexcept;
128 exists(file_status __s)
noexcept
129 {
return status_known(__s) && __s.type() != file_type::not_found; }
133 exists(
const path& __p)
134 {
return exists(status(__p)); }
138 exists(
const path& __p, error_code& __ec)
noexcept
140 auto __s = status(__p, __ec);
141 if (status_known(__s))
144 return __s.type() != file_type::not_found;
150 uintmax_t file_size(
const path& __p);
153 uintmax_t file_size(
const path& __p, error_code& __ec)
noexcept;
156 uintmax_t hard_link_count(
const path& __p);
159 uintmax_t hard_link_count(
const path& __p, error_code& __ec)
noexcept;
163 is_block_file(file_status __s)
noexcept
164 {
return __s.type() == file_type::block; }
168 is_block_file(
const path& __p)
169 {
return is_block_file(status(__p)); }
173 is_block_file(
const path& __p, error_code& __ec)
noexcept
174 {
return is_block_file(status(__p, __ec)); }
178 is_character_file(file_status __s)
noexcept
179 {
return __s.type() == file_type::character; }
183 is_character_file(
const path& __p)
184 {
return is_character_file(status(__p)); }
188 is_character_file(
const path& __p, error_code& __ec)
noexcept
189 {
return is_character_file(status(__p, __ec)); }
193 is_directory(file_status __s)
noexcept
194 {
return __s.type() == file_type::directory; }
198 is_directory(
const path& __p)
199 {
return is_directory(status(__p)); }
203 is_directory(
const path& __p, error_code& __ec)
noexcept
204 {
return is_directory(status(__p, __ec)); }
207 bool is_empty(
const path& __p);
210 bool is_empty(
const path& __p, error_code& __ec);
214 is_fifo(file_status __s)
noexcept
215 {
return __s.type() == file_type::fifo; }
219 is_fifo(
const path& __p)
220 {
return is_fifo(status(__p)); }
224 is_fifo(
const path& __p, error_code& __ec)
noexcept
225 {
return is_fifo(status(__p, __ec)); }
229 is_other(file_status __s)
noexcept
231 return exists(__s) && !is_regular_file(__s) && !is_directory(__s)
237 is_other(
const path& __p)
238 {
return is_other(status(__p)); }
242 is_other(
const path& __p, error_code& __ec)
noexcept
243 {
return is_other(status(__p, __ec)); }
247 is_regular_file(file_status __s)
noexcept
248 {
return __s.type() == file_type::regular; }
252 is_regular_file(
const path& __p)
253 {
return is_regular_file(status(__p)); }
257 is_regular_file(
const path& __p, error_code& __ec)
noexcept
258 {
return is_regular_file(status(__p, __ec)); }
262 is_socket(file_status __s)
noexcept
263 {
return __s.type() == file_type::socket; }
267 is_socket(
const path& __p)
268 {
return is_socket(status(__p)); }
272 is_socket(
const path& __p, error_code& __ec)
noexcept
273 {
return is_socket(status(__p, __ec)); }
277 is_symlink(file_status __s)
noexcept
278 {
return __s.type() == file_type::symlink; }
282 is_symlink(
const path& __p)
283 {
return is_symlink(symlink_status(__p)); }
287 is_symlink(
const path& __p, error_code& __ec)
noexcept
288 {
return is_symlink(symlink_status(__p, __ec)); }
294 file_time_type last_write_time(
const path& __p, error_code& __ec)
noexcept;
298 error_code& __ec)
noexcept;
301 permissions(
const path& __p,
perms __prms,
305 permissions(
const path& __p,
perms __prms, error_code& __ec)
noexcept
306 { permissions(__p, __prms, perm_options::replace, __ec); }
310 error_code& __ec)
noexcept;
313 inline path proximate(
const path& __p, error_code& __ec)
314 {
return proximate(__p, current_path(), __ec); }
317 path proximate(
const path& __p,
const path& __base = current_path());
320 path proximate(
const path& __p,
const path& __base, error_code& __ec);
323 path read_symlink(
const path& __p);
326 path read_symlink(
const path& __p, error_code& __ec);
329 inline path relative(
const path& __p, error_code& __ec)
330 {
return relative(__p, current_path(), __ec); }
333 path relative(
const path& __p,
const path& __base = current_path());
336 path relative(
const path& __p,
const path& __base, error_code& __ec);
338 bool remove(
const path& __p);
339 bool remove(
const path& __p, error_code& __ec)
noexcept;
341 uintmax_t remove_all(
const path& __p);
342 uintmax_t remove_all(
const path& __p, error_code& __ec);
344 void rename(
const path& __from,
const path& __to);
345 void rename(
const path& __from,
const path& __to, error_code& __ec)
noexcept;
347 void resize_file(
const path& __p, uintmax_t __size);
348 void resize_file(
const path& __p, uintmax_t __size, error_code& __ec)
noexcept;
351 space_info space(
const path& __p);
354 space_info space(
const path& __p, error_code& __ec)
noexcept;
357 file_status status(
const path& __p);
360 file_status status(
const path& __p, error_code& __ec)
noexcept;
363 inline bool status_known(file_status __s)
noexcept
364 {
return __s.type() != file_type::none; }
367 file_status symlink_status(
const path& __p);
370 file_status symlink_status(
const path& __p, error_code& __ec)
noexcept;
373 path temp_directory_path();
376 path temp_directory_path(error_code& __ec);
379 path weakly_canonical(
const path& __p);
382 path weakly_canonical(
const path& __p, error_code& __ec);
387_GLIBCXX_END_NAMESPACE_VERSION
copy_options
Bitmask type controlling effects of filesystem::copy
perms
Bitmask type representing file access permissions.
perm_options
Bitmask type controlling changes to permissions.
__file_clock::time_point file_time_type
The type used for file timestamps.
ISO C++ entities toplevel namespace is std.