xref: /freebsd-src/contrib/llvm-project/libcxx/include/__filesystem/operations.h (revision 81ad626541db97eb356e2c1d4a20eb2a26a766ab)
10eae32dcSDimitry Andric // -*- C++ -*-
20eae32dcSDimitry Andric //===----------------------------------------------------------------------===//
30eae32dcSDimitry Andric //
40eae32dcSDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
50eae32dcSDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
60eae32dcSDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
70eae32dcSDimitry Andric //
80eae32dcSDimitry Andric //===----------------------------------------------------------------------===//
90eae32dcSDimitry Andric 
100eae32dcSDimitry Andric #ifndef _LIBCPP___FILESYSTEM_OPERATIONS_H
110eae32dcSDimitry Andric #define _LIBCPP___FILESYSTEM_OPERATIONS_H
120eae32dcSDimitry Andric 
130eae32dcSDimitry Andric #include <__availability>
14*81ad6265SDimitry Andric #include <__chrono/time_point.h>
150eae32dcSDimitry Andric #include <__config>
160eae32dcSDimitry Andric #include <__filesystem/copy_options.h>
170eae32dcSDimitry Andric #include <__filesystem/file_status.h>
180eae32dcSDimitry Andric #include <__filesystem/file_time_type.h>
190eae32dcSDimitry Andric #include <__filesystem/file_type.h>
200eae32dcSDimitry Andric #include <__filesystem/path.h>
210eae32dcSDimitry Andric #include <__filesystem/perm_options.h>
220eae32dcSDimitry Andric #include <__filesystem/perms.h>
230eae32dcSDimitry Andric #include <__filesystem/space_info.h>
240eae32dcSDimitry Andric #include <cstdint>
250eae32dcSDimitry Andric #include <system_error>
260eae32dcSDimitry Andric 
27*81ad6265SDimitry Andric #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
28*81ad6265SDimitry Andric #  pragma GCC system_header
29*81ad6265SDimitry Andric #endif
30*81ad6265SDimitry Andric 
310eae32dcSDimitry Andric #ifndef _LIBCPP_CXX03_LANG
320eae32dcSDimitry Andric 
330eae32dcSDimitry Andric _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
340eae32dcSDimitry Andric 
350eae32dcSDimitry Andric _LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
360eae32dcSDimitry Andric 
3704eeddc0SDimitry Andric _LIBCPP_FUNC_VIS path __absolute(const path&, error_code* __ec = nullptr);
3804eeddc0SDimitry Andric _LIBCPP_FUNC_VIS path __canonical(const path&, error_code* __ec = nullptr);
3904eeddc0SDimitry Andric _LIBCPP_FUNC_VIS bool __copy_file(const path& __from, const path& __to, copy_options __opt, error_code* __ec = nullptr);
4004eeddc0SDimitry Andric _LIBCPP_FUNC_VIS void __copy_symlink(const path& __existing_symlink, const path& __new_symlink, error_code* __ec = nullptr);
4104eeddc0SDimitry Andric _LIBCPP_FUNC_VIS void __copy(const path& __from, const path& __to, copy_options __opt, error_code* __ec = nullptr);
4204eeddc0SDimitry Andric _LIBCPP_FUNC_VIS bool __create_directories(const path& p, error_code* ec = nullptr);
4304eeddc0SDimitry Andric _LIBCPP_FUNC_VIS void __create_directory_symlink(const path& __to, const path& __new_symlink, error_code* __ec = nullptr);
4404eeddc0SDimitry Andric _LIBCPP_FUNC_VIS bool __create_directory(const path& p, error_code* ec = nullptr);
4504eeddc0SDimitry Andric _LIBCPP_FUNC_VIS bool __create_directory(const path& p, const path& attributes, error_code* ec = nullptr);
4604eeddc0SDimitry Andric _LIBCPP_FUNC_VIS void __create_hard_link(const path& __to, const path& __new_hard_link, error_code* __ec = nullptr);
4704eeddc0SDimitry Andric _LIBCPP_FUNC_VIS void __create_symlink(const path& __to, const path& __new_symlink, error_code* __ec = nullptr);
4804eeddc0SDimitry Andric _LIBCPP_FUNC_VIS path __current_path(error_code* __ec = nullptr);
4904eeddc0SDimitry Andric _LIBCPP_FUNC_VIS void __current_path(const path&, error_code* __ec = nullptr);
5004eeddc0SDimitry Andric _LIBCPP_FUNC_VIS bool __equivalent(const path&, const path&, error_code* __ec = nullptr);
5104eeddc0SDimitry Andric _LIBCPP_FUNC_VIS file_status __status(const path&, error_code* __ec = nullptr);
5204eeddc0SDimitry Andric _LIBCPP_FUNC_VIS uintmax_t __file_size(const path&, error_code* __ec = nullptr);
5304eeddc0SDimitry Andric _LIBCPP_FUNC_VIS uintmax_t __hard_link_count(const path&, error_code* __ec = nullptr);
5404eeddc0SDimitry Andric _LIBCPP_FUNC_VIS file_status __symlink_status(const path&, error_code* __ec = nullptr);
5504eeddc0SDimitry Andric _LIBCPP_FUNC_VIS file_time_type __last_write_time(const path& p, error_code* ec = nullptr);
5604eeddc0SDimitry Andric _LIBCPP_FUNC_VIS void __last_write_time(const path& p, file_time_type new_time, error_code* ec = nullptr);
5704eeddc0SDimitry Andric _LIBCPP_FUNC_VIS path __weakly_canonical(path const& __p, error_code* __ec = nullptr);
5804eeddc0SDimitry Andric _LIBCPP_FUNC_VIS path __read_symlink(const path& p, error_code* ec = nullptr);
5904eeddc0SDimitry Andric _LIBCPP_FUNC_VIS uintmax_t __remove_all(const path& p, error_code* ec = nullptr);
6004eeddc0SDimitry Andric _LIBCPP_FUNC_VIS bool __remove(const path& p, error_code* ec = nullptr);
6104eeddc0SDimitry Andric _LIBCPP_FUNC_VIS void __rename(const path& from, const path& to, error_code* ec = nullptr);
6204eeddc0SDimitry Andric _LIBCPP_FUNC_VIS void __resize_file(const path& p, uintmax_t size, error_code* ec = nullptr);
6304eeddc0SDimitry Andric _LIBCPP_FUNC_VIS path __temp_directory_path(error_code* __ec = nullptr);
640eae32dcSDimitry Andric 
65*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI path absolute(const path& __p) { return __absolute(__p); }
66*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI path absolute(const path& __p, error_code& __ec) { return __absolute(__p, &__ec); }
67*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI path canonical(const path& __p)                   { return __canonical(__p); }
68*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI path canonical(const path& __p, error_code& __ec) { return __canonical(__p, &__ec); }
69*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI bool copy_file(const path& __from, const path& __to) { return __copy_file(__from, __to, copy_options::none); }
70*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI bool copy_file(const path& __from, const path& __to, error_code& __ec) { return __copy_file(__from, __to, copy_options::none, &__ec); }
71*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI bool copy_file(const path& __from, const path& __to, copy_options __opt) { return __copy_file(__from, __to, __opt); }
72*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI bool copy_file(const path& __from, const path& __to, copy_options __opt, error_code& __ec) { return __copy_file(__from, __to, __opt, &__ec); }
73*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI void copy_symlink(const path& __from, const path& __to) { __copy_symlink(__from, __to); }
74*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI void copy_symlink(const path& __from, const path& __to, error_code& __ec) noexcept { __copy_symlink(__from, __to, &__ec); }
75*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI void copy(const path& __from, const path& __to) { __copy(__from, __to, copy_options::none); }
76*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI void copy(const path& __from, const path& __to, error_code& __ec) { __copy(__from, __to, copy_options::none, &__ec); }
77*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI void copy(const path& __from, const path& __to, copy_options __opt) { __copy(__from, __to, __opt); }
78*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI void copy(const path& __from, const path& __to, copy_options __opt, error_code& __ec) { __copy(__from, __to, __opt, &__ec); }
79*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI bool create_directories(const path& __p) { return __create_directories(__p); }
80*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI bool create_directories(const path& __p, error_code& __ec) { return __create_directories(__p, &__ec); }
81*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI void create_directory_symlink(const path& __target, const path& __link) { __create_directory_symlink(__target, __link); }
82*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI void create_directory_symlink(const path& __target, const path& __link, error_code& __ec) noexcept { __create_directory_symlink(__target, __link, &__ec); }
83*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI bool create_directory(const path& __p) { return __create_directory(__p); }
84*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI bool create_directory(const path& __p, error_code& __ec) noexcept { return __create_directory(__p, &__ec); }
85*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI bool create_directory(const path& __p, const path& __attrs) { return __create_directory(__p, __attrs); }
86*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI bool create_directory(const path& __p, const path& __attrs, error_code& __ec) noexcept { return __create_directory(__p, __attrs, &__ec); }
87*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI void create_hard_link(const path& __target, const path& __link) { __create_hard_link(__target, __link); }
88*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI void create_hard_link(const path& __target, const path& __link, error_code& __ec) noexcept { __create_hard_link(__target, __link, &__ec); }
89*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI void create_symlink(const path& __target, const path& __link) { __create_symlink(__target, __link); }
90*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI void create_symlink(const path& __target, const path& __link, error_code& __ec) noexcept { return __create_symlink(__target, __link, &__ec); }
91*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI path current_path() { return __current_path(); }
92*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI path current_path(error_code& __ec) { return __current_path(&__ec); }
93*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI void current_path(const path& __p) { __current_path(__p); }
94*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI void current_path(const path& __p, error_code& __ec) noexcept { __current_path(__p, &__ec); }
95*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI bool equivalent(const path& __p1, const path& __p2) { return __equivalent(__p1, __p2); }
96*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI bool equivalent(const path& __p1, const path& __p2, error_code& __ec) noexcept { return __equivalent(__p1, __p2, &__ec); }
97*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI bool status_known(file_status __s) noexcept { return __s.type() != file_type::none; }
98*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI bool exists(file_status __s) noexcept { return status_known(__s) && __s.type() != file_type::not_found; }
99*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI bool exists(const path& __p) { return exists(__status(__p)); }
1000eae32dcSDimitry Andric 
10104eeddc0SDimitry Andric inline _LIBCPP_INLINE_VISIBILITY bool exists(const path& __p, error_code& __ec) noexcept {
1020eae32dcSDimitry Andric   auto __s = __status(__p, &__ec);
1030eae32dcSDimitry Andric   if (status_known(__s))
1040eae32dcSDimitry Andric     __ec.clear();
1050eae32dcSDimitry Andric   return exists(__s);
1060eae32dcSDimitry Andric }
1070eae32dcSDimitry Andric 
108*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI uintmax_t file_size(const path& __p) { return __file_size(__p); }
109*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI uintmax_t file_size(const path& __p, error_code& __ec) noexcept { return __file_size(__p, &__ec); }
110*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI uintmax_t hard_link_count(const path& __p) { return __hard_link_count(__p); }
111*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI uintmax_t hard_link_count(const path& __p, error_code& __ec) noexcept { return __hard_link_count(__p, &__ec); }
112*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI bool is_block_file(file_status __s) noexcept { return __s.type() == file_type::block; }
113*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI bool is_block_file(const path& __p) { return is_block_file(__status(__p)); }
114*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI bool is_block_file(const path& __p, error_code& __ec) noexcept { return is_block_file(__status(__p, &__ec)); }
115*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI bool is_character_file(file_status __s) noexcept { return __s.type() == file_type::character; }
116*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI bool is_character_file(const path& __p) { return is_character_file(__status(__p)); }
117*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI bool is_character_file(const path& __p, error_code& __ec) noexcept { return is_character_file(__status(__p, &__ec)); }
118*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI bool is_directory(file_status __s) noexcept { return __s.type() == file_type::directory; }
119*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI bool is_directory(const path& __p) { return is_directory(__status(__p)); }
120*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI bool is_directory(const path& __p, error_code& __ec) noexcept { return is_directory(__status(__p, &__ec)); }
12104eeddc0SDimitry Andric _LIBCPP_FUNC_VIS bool __fs_is_empty(const path& p, error_code* ec = nullptr);
122*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI bool is_empty(const path& __p) { return __fs_is_empty(__p); }
123*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI bool is_empty(const path& __p, error_code& __ec) { return __fs_is_empty(__p, &__ec); }
124*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI bool is_fifo(file_status __s) noexcept { return __s.type() == file_type::fifo; }
125*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI bool is_fifo(const path& __p) { return is_fifo(__status(__p)); }
126*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI bool is_fifo(const path& __p, error_code& __ec) noexcept { return is_fifo(__status(__p, &__ec)); }
127*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI bool is_regular_file(file_status __s) noexcept { return __s.type() == file_type::regular; }
128*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI bool is_regular_file(const path& __p) { return is_regular_file(__status(__p)); }
129*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI bool is_regular_file(const path& __p, error_code& __ec) noexcept { return is_regular_file(__status(__p, &__ec)); }
130*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI bool is_symlink(file_status __s) noexcept { return __s.type() == file_type::symlink; }
131*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI bool is_symlink(const path& __p) { return is_symlink(__symlink_status(__p)); }
132*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI bool is_symlink(const path& __p, error_code& __ec) noexcept { return is_symlink(__symlink_status(__p, &__ec)); }
133*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI bool is_other(file_status __s) noexcept { return exists(__s) && !is_regular_file(__s) && !is_directory(__s) && !is_symlink(__s); }
134*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI bool is_other(const path& __p) { return is_other(__status(__p)); }
135*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI bool is_other(const path& __p, error_code& __ec) noexcept { return is_other(__status(__p, &__ec)); }
136*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI bool is_socket(file_status __s) noexcept { return __s.type() == file_type::socket; }
137*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI bool is_socket(const path& __p) { return is_socket(__status(__p)); }
138*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI bool is_socket(const path& __p, error_code& __ec) noexcept { return is_socket(__status(__p, &__ec)); }
139*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI file_time_type last_write_time(const path& __p) { return __last_write_time(__p); }
140*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI file_time_type last_write_time(const path& __p, error_code& __ec) noexcept { return __last_write_time(__p, &__ec); }
141*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI void last_write_time(const path& __p, file_time_type __t) { __last_write_time(__p, __t); }
142*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI void last_write_time(const path& __p, file_time_type __t, error_code& __ec) noexcept { __last_write_time(__p, __t, &__ec); }
14304eeddc0SDimitry Andric _LIBCPP_FUNC_VIS void __permissions(const path&, perms, perm_options, error_code* = nullptr);
144*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI void permissions(const path& __p, perms __prms, perm_options __opts = perm_options::replace) { __permissions(__p, __prms, __opts); }
145*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI void permissions(const path& __p, perms __prms, error_code& __ec) noexcept { __permissions(__p, __prms, perm_options::replace, &__ec); }
146*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI void permissions(const path& __p, perms __prms, perm_options __opts, error_code& __ec) { __permissions(__p, __prms, __opts, &__ec); }
1470eae32dcSDimitry Andric 
14804eeddc0SDimitry Andric inline _LIBCPP_INLINE_VISIBILITY path proximate(const path& __p, const path& __base, error_code& __ec) {
1490eae32dcSDimitry Andric   path __tmp = __weakly_canonical(__p, &__ec);
1500eae32dcSDimitry Andric   if (__ec)
1510eae32dcSDimitry Andric     return {};
1520eae32dcSDimitry Andric   path __tmp_base = __weakly_canonical(__base, &__ec);
1530eae32dcSDimitry Andric   if (__ec)
1540eae32dcSDimitry Andric     return {};
1550eae32dcSDimitry Andric   return __tmp.lexically_proximate(__tmp_base);
1560eae32dcSDimitry Andric }
1570eae32dcSDimitry Andric 
158*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI path proximate(const path& __p, error_code& __ec) { return proximate(__p, current_path(), __ec); }
159*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI path proximate(const path& __p, const path& __base = current_path()) { return __weakly_canonical(__p).lexically_proximate(__weakly_canonical(__base)); }
160*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI path read_symlink(const path& __p) { return __read_symlink(__p); }
161*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI path read_symlink(const path& __p, error_code& __ec) { return __read_symlink(__p, &__ec); }
1620eae32dcSDimitry Andric 
16304eeddc0SDimitry Andric inline _LIBCPP_INLINE_VISIBILITY path relative(const path& __p, const path& __base, error_code& __ec) {
1640eae32dcSDimitry Andric   path __tmp = __weakly_canonical(__p, &__ec);
1650eae32dcSDimitry Andric   if (__ec)
1660eae32dcSDimitry Andric     return path();
1670eae32dcSDimitry Andric   path __tmpbase = __weakly_canonical(__base, &__ec);
1680eae32dcSDimitry Andric   if (__ec)
1690eae32dcSDimitry Andric     return path();
1700eae32dcSDimitry Andric   return __tmp.lexically_relative(__tmpbase);
1710eae32dcSDimitry Andric }
1720eae32dcSDimitry Andric 
173*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI path relative(const path& __p, error_code& __ec) { return relative(__p, current_path(), __ec); }
174*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI path relative(const path& __p, const path& __base = current_path()) { return __weakly_canonical(__p).lexically_relative(__weakly_canonical(__base)); }
175*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI uintmax_t remove_all(const path& __p) { return __remove_all(__p); }
176*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI uintmax_t remove_all(const path& __p, error_code& __ec) { return __remove_all(__p, &__ec); }
177*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI bool remove(const path& __p) { return __remove(__p); }
178*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI bool remove(const path& __p, error_code& __ec) noexcept { return __remove(__p, &__ec); }
179*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI void rename(const path& __from, const path& __to) { return __rename(__from, __to); }
180*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI void rename(const path& __from, const path& __to, error_code& __ec) noexcept { return __rename(__from, __to, &__ec); }
181*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI void resize_file(const path& __p, uintmax_t __ns) { return __resize_file(__p, __ns); }
182*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI void resize_file(const path& __p, uintmax_t __ns, error_code& __ec) noexcept { return __resize_file(__p, __ns, &__ec); }
18304eeddc0SDimitry Andric _LIBCPP_FUNC_VIS space_info __space(const path&, error_code* __ec = nullptr);
184*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI space_info space(const path& __p) { return __space(__p); }
185*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI space_info space(const path& __p, error_code& __ec) noexcept { return __space(__p, &__ec); }
186*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI file_status status(const path& __p) { return __status(__p); }
187*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI file_status status(const path& __p, error_code& __ec) noexcept { return __status(__p, &__ec); }
188*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI file_status symlink_status(const path& __p) { return __symlink_status(__p); }
189*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI file_status symlink_status(const path& __p, error_code& __ec) noexcept { return __symlink_status(__p, &__ec); }
190*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI path temp_directory_path() { return __temp_directory_path(); }
191*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI path temp_directory_path(error_code& __ec) { return __temp_directory_path(&__ec); }
192*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI path weakly_canonical(path const& __p) { return __weakly_canonical(__p); }
193*81ad6265SDimitry Andric inline _LIBCPP_HIDE_FROM_ABI path weakly_canonical(path const& __p, error_code& __ec) { return __weakly_canonical(__p, &__ec); }
1940eae32dcSDimitry Andric 
1950eae32dcSDimitry Andric _LIBCPP_AVAILABILITY_FILESYSTEM_POP
1960eae32dcSDimitry Andric 
1970eae32dcSDimitry Andric _LIBCPP_END_NAMESPACE_FILESYSTEM
1980eae32dcSDimitry Andric 
1990eae32dcSDimitry Andric #endif // _LIBCPP_CXX03_LANG
2000eae32dcSDimitry Andric 
2010eae32dcSDimitry Andric #endif // _LIBCPP___FILESYSTEM_OPERATIONS_H
202