xref: /openbsd-src/gnu/llvm/libcxx/include/__filesystem/operations.h (revision 4bdff4bed0e3d54e55670334c7d0077db4170f86)
1*4bdff4beSrobert // -*- C++ -*-
2*4bdff4beSrobert //===----------------------------------------------------------------------===//
3*4bdff4beSrobert //
4*4bdff4beSrobert // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5*4bdff4beSrobert // See https://llvm.org/LICENSE.txt for license information.
6*4bdff4beSrobert // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7*4bdff4beSrobert //
8*4bdff4beSrobert //===----------------------------------------------------------------------===//
9*4bdff4beSrobert 
10*4bdff4beSrobert #ifndef _LIBCPP___FILESYSTEM_OPERATIONS_H
11*4bdff4beSrobert #define _LIBCPP___FILESYSTEM_OPERATIONS_H
12*4bdff4beSrobert 
13*4bdff4beSrobert #include <__availability>
14*4bdff4beSrobert #include <__chrono/time_point.h>
15*4bdff4beSrobert #include <__config>
16*4bdff4beSrobert #include <__filesystem/copy_options.h>
17*4bdff4beSrobert #include <__filesystem/file_status.h>
18*4bdff4beSrobert #include <__filesystem/file_time_type.h>
19*4bdff4beSrobert #include <__filesystem/file_type.h>
20*4bdff4beSrobert #include <__filesystem/path.h>
21*4bdff4beSrobert #include <__filesystem/perm_options.h>
22*4bdff4beSrobert #include <__filesystem/perms.h>
23*4bdff4beSrobert #include <__filesystem/space_info.h>
24*4bdff4beSrobert #include <cstdint>
25*4bdff4beSrobert #include <system_error>
26*4bdff4beSrobert 
27*4bdff4beSrobert #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
28*4bdff4beSrobert #  pragma GCC system_header
29*4bdff4beSrobert #endif
30*4bdff4beSrobert 
31*4bdff4beSrobert #ifndef _LIBCPP_CXX03_LANG
32*4bdff4beSrobert 
33*4bdff4beSrobert _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
34*4bdff4beSrobert 
35*4bdff4beSrobert _LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
36*4bdff4beSrobert 
37*4bdff4beSrobert _LIBCPP_FUNC_VIS path __absolute(const path&, error_code* __ec = nullptr);
38*4bdff4beSrobert _LIBCPP_FUNC_VIS path __canonical(const path&, error_code* __ec = nullptr);
39*4bdff4beSrobert _LIBCPP_FUNC_VIS bool __copy_file(const path& __from, const path& __to, copy_options __opt, error_code* __ec = nullptr);
40*4bdff4beSrobert _LIBCPP_FUNC_VIS void __copy_symlink(const path& __existing_symlink, const path& __new_symlink, error_code* __ec = nullptr);
41*4bdff4beSrobert _LIBCPP_FUNC_VIS void __copy(const path& __from, const path& __to, copy_options __opt, error_code* __ec = nullptr);
42*4bdff4beSrobert _LIBCPP_FUNC_VIS bool __create_directories(const path&, error_code* = nullptr);
43*4bdff4beSrobert _LIBCPP_FUNC_VIS void __create_directory_symlink(const path& __to, const path& __new_symlink, error_code* __ec = nullptr);
44*4bdff4beSrobert _LIBCPP_FUNC_VIS bool __create_directory(const path&, error_code* = nullptr);
45*4bdff4beSrobert _LIBCPP_FUNC_VIS bool __create_directory(const path&, const path& __attributes, error_code* = nullptr);
46*4bdff4beSrobert _LIBCPP_FUNC_VIS void __create_hard_link(const path& __to, const path& __new_hard_link, error_code* __ec = nullptr);
47*4bdff4beSrobert _LIBCPP_FUNC_VIS void __create_symlink(const path& __to, const path& __new_symlink, error_code* __ec = nullptr);
48*4bdff4beSrobert _LIBCPP_FUNC_VIS path __current_path(error_code* __ec = nullptr);
49*4bdff4beSrobert _LIBCPP_FUNC_VIS void __current_path(const path&, error_code* __ec = nullptr);
50*4bdff4beSrobert _LIBCPP_FUNC_VIS bool __equivalent(const path&, const path&, error_code* __ec = nullptr);
51*4bdff4beSrobert _LIBCPP_FUNC_VIS file_status __status(const path&, error_code* __ec = nullptr);
52*4bdff4beSrobert _LIBCPP_FUNC_VIS uintmax_t __file_size(const path&, error_code* __ec = nullptr);
53*4bdff4beSrobert _LIBCPP_FUNC_VIS uintmax_t __hard_link_count(const path&, error_code* __ec = nullptr);
54*4bdff4beSrobert _LIBCPP_FUNC_VIS file_status __symlink_status(const path&, error_code* __ec = nullptr);
55*4bdff4beSrobert _LIBCPP_FUNC_VIS file_time_type __last_write_time(const path&, error_code* __ec = nullptr);
56*4bdff4beSrobert _LIBCPP_FUNC_VIS void __last_write_time(const path&, file_time_type __new_time, error_code* __ec = nullptr);
57*4bdff4beSrobert _LIBCPP_FUNC_VIS path __weakly_canonical(path const& __p, error_code* __ec = nullptr);
58*4bdff4beSrobert _LIBCPP_FUNC_VIS path __read_symlink(const path&, error_code* __ec = nullptr);
59*4bdff4beSrobert _LIBCPP_FUNC_VIS uintmax_t __remove_all(const path&, error_code* __ec = nullptr);
60*4bdff4beSrobert _LIBCPP_FUNC_VIS bool __remove(const path&, error_code* __ec = nullptr);
61*4bdff4beSrobert _LIBCPP_FUNC_VIS void __rename(const path& __from, const path& __to, error_code* __ec = nullptr);
62*4bdff4beSrobert _LIBCPP_FUNC_VIS void __resize_file(const path&, uintmax_t __size, error_code* = nullptr);
63*4bdff4beSrobert _LIBCPP_FUNC_VIS path __temp_directory_path(error_code* __ec = nullptr);
64*4bdff4beSrobert 
absolute(const path & __p)65*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI path absolute(const path& __p) { return __absolute(__p); }
absolute(const path & __p,error_code & __ec)66*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI path absolute(const path& __p, error_code& __ec) { return __absolute(__p, &__ec); }
canonical(const path & __p)67*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI path canonical(const path& __p)                   { return __canonical(__p); }
canonical(const path & __p,error_code & __ec)68*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI path canonical(const path& __p, error_code& __ec) { return __canonical(__p, &__ec); }
copy_file(const path & __from,const path & __to)69*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI bool copy_file(const path& __from, const path& __to) { return __copy_file(__from, __to, copy_options::none); }
copy_file(const path & __from,const path & __to,error_code & __ec)70*4bdff4beSrobert 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); }
copy_file(const path & __from,const path & __to,copy_options __opt)71*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI bool copy_file(const path& __from, const path& __to, copy_options __opt) { return __copy_file(__from, __to, __opt); }
copy_file(const path & __from,const path & __to,copy_options __opt,error_code & __ec)72*4bdff4beSrobert 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); }
copy_symlink(const path & __from,const path & __to)73*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI void copy_symlink(const path& __from, const path& __to) { __copy_symlink(__from, __to); }
copy_symlink(const path & __from,const path & __to,error_code & __ec)74*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI void copy_symlink(const path& __from, const path& __to, error_code& __ec) noexcept { __copy_symlink(__from, __to, &__ec); }
copy(const path & __from,const path & __to)75*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI void copy(const path& __from, const path& __to) { __copy(__from, __to, copy_options::none); }
copy(const path & __from,const path & __to,error_code & __ec)76*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI void copy(const path& __from, const path& __to, error_code& __ec) { __copy(__from, __to, copy_options::none, &__ec); }
copy(const path & __from,const path & __to,copy_options __opt)77*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI void copy(const path& __from, const path& __to, copy_options __opt) { __copy(__from, __to, __opt); }
copy(const path & __from,const path & __to,copy_options __opt,error_code & __ec)78*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI void copy(const path& __from, const path& __to, copy_options __opt, error_code& __ec) { __copy(__from, __to, __opt, &__ec); }
create_directories(const path & __p)79*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI bool create_directories(const path& __p) { return __create_directories(__p); }
create_directories(const path & __p,error_code & __ec)80*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI bool create_directories(const path& __p, error_code& __ec) { return __create_directories(__p, &__ec); }
create_directory_symlink(const path & __target,const path & __link)81*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI void create_directory_symlink(const path& __target, const path& __link) { __create_directory_symlink(__target, __link); }
create_directory_symlink(const path & __target,const path & __link,error_code & __ec)82*4bdff4beSrobert 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); }
create_directory(const path & __p)83*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI bool create_directory(const path& __p) { return __create_directory(__p); }
create_directory(const path & __p,error_code & __ec)84*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI bool create_directory(const path& __p, error_code& __ec) noexcept { return __create_directory(__p, &__ec); }
create_directory(const path & __p,const path & __attrs)85*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI bool create_directory(const path& __p, const path& __attrs) { return __create_directory(__p, __attrs); }
create_directory(const path & __p,const path & __attrs,error_code & __ec)86*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI bool create_directory(const path& __p, const path& __attrs, error_code& __ec) noexcept { return __create_directory(__p, __attrs, &__ec); }
create_hard_link(const path & __target,const path & __link)87*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI void create_hard_link(const path& __target, const path& __link) { __create_hard_link(__target, __link); }
create_hard_link(const path & __target,const path & __link,error_code & __ec)88*4bdff4beSrobert 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); }
create_symlink(const path & __target,const path & __link)89*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI void create_symlink(const path& __target, const path& __link) { __create_symlink(__target, __link); }
create_symlink(const path & __target,const path & __link,error_code & __ec)90*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI void create_symlink(const path& __target, const path& __link, error_code& __ec) noexcept { return __create_symlink(__target, __link, &__ec); }
current_path()91*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI path current_path() { return __current_path(); }
current_path(error_code & __ec)92*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI path current_path(error_code& __ec) { return __current_path(&__ec); }
current_path(const path & __p)93*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI void current_path(const path& __p) { __current_path(__p); }
current_path(const path & __p,error_code & __ec)94*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI void current_path(const path& __p, error_code& __ec) noexcept { __current_path(__p, &__ec); }
equivalent(const path & __p1,const path & __p2)95*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI bool equivalent(const path& __p1, const path& __p2) { return __equivalent(__p1, __p2); }
equivalent(const path & __p1,const path & __p2,error_code & __ec)96*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI bool equivalent(const path& __p1, const path& __p2, error_code& __ec) noexcept { return __equivalent(__p1, __p2, &__ec); }
status_known(file_status __s)97*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI bool status_known(file_status __s) noexcept { return __s.type() != file_type::none; }
exists(file_status __s)98*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI bool exists(file_status __s) noexcept { return status_known(__s) && __s.type() != file_type::not_found; }
exists(const path & __p)99*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI bool exists(const path& __p) { return exists(__status(__p)); }
100*4bdff4beSrobert 
exists(const path & __p,error_code & __ec)101*4bdff4beSrobert inline _LIBCPP_INLINE_VISIBILITY bool exists(const path& __p, error_code& __ec) noexcept {
102*4bdff4beSrobert   auto __s = __status(__p, &__ec);
103*4bdff4beSrobert   if (status_known(__s))
104*4bdff4beSrobert     __ec.clear();
105*4bdff4beSrobert   return exists(__s);
106*4bdff4beSrobert }
107*4bdff4beSrobert 
file_size(const path & __p)108*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI uintmax_t file_size(const path& __p) { return __file_size(__p); }
file_size(const path & __p,error_code & __ec)109*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI uintmax_t file_size(const path& __p, error_code& __ec) noexcept { return __file_size(__p, &__ec); }
hard_link_count(const path & __p)110*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI uintmax_t hard_link_count(const path& __p) { return __hard_link_count(__p); }
hard_link_count(const path & __p,error_code & __ec)111*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI uintmax_t hard_link_count(const path& __p, error_code& __ec) noexcept { return __hard_link_count(__p, &__ec); }
is_block_file(file_status __s)112*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI bool is_block_file(file_status __s) noexcept { return __s.type() == file_type::block; }
is_block_file(const path & __p)113*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI bool is_block_file(const path& __p) { return is_block_file(__status(__p)); }
is_block_file(const path & __p,error_code & __ec)114*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI bool is_block_file(const path& __p, error_code& __ec) noexcept { return is_block_file(__status(__p, &__ec)); }
is_character_file(file_status __s)115*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI bool is_character_file(file_status __s) noexcept { return __s.type() == file_type::character; }
is_character_file(const path & __p)116*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI bool is_character_file(const path& __p) { return is_character_file(__status(__p)); }
is_character_file(const path & __p,error_code & __ec)117*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI bool is_character_file(const path& __p, error_code& __ec) noexcept { return is_character_file(__status(__p, &__ec)); }
is_directory(file_status __s)118*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI bool is_directory(file_status __s) noexcept { return __s.type() == file_type::directory; }
is_directory(const path & __p)119*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI bool is_directory(const path& __p) { return is_directory(__status(__p)); }
is_directory(const path & __p,error_code & __ec)120*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI bool is_directory(const path& __p, error_code& __ec) noexcept { return is_directory(__status(__p, &__ec)); }
121*4bdff4beSrobert _LIBCPP_FUNC_VIS bool __fs_is_empty(const path& __p, error_code* __ec = nullptr);
is_empty(const path & __p)122*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI bool is_empty(const path& __p) { return __fs_is_empty(__p); }
is_empty(const path & __p,error_code & __ec)123*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI bool is_empty(const path& __p, error_code& __ec) { return __fs_is_empty(__p, &__ec); }
is_fifo(file_status __s)124*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI bool is_fifo(file_status __s) noexcept { return __s.type() == file_type::fifo; }
is_fifo(const path & __p)125*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI bool is_fifo(const path& __p) { return is_fifo(__status(__p)); }
is_fifo(const path & __p,error_code & __ec)126*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI bool is_fifo(const path& __p, error_code& __ec) noexcept { return is_fifo(__status(__p, &__ec)); }
is_regular_file(file_status __s)127*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI bool is_regular_file(file_status __s) noexcept { return __s.type() == file_type::regular; }
is_regular_file(const path & __p)128*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI bool is_regular_file(const path& __p) { return is_regular_file(__status(__p)); }
is_regular_file(const path & __p,error_code & __ec)129*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI bool is_regular_file(const path& __p, error_code& __ec) noexcept { return is_regular_file(__status(__p, &__ec)); }
is_symlink(file_status __s)130*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI bool is_symlink(file_status __s) noexcept { return __s.type() == file_type::symlink; }
is_symlink(const path & __p)131*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI bool is_symlink(const path& __p) { return is_symlink(__symlink_status(__p)); }
is_symlink(const path & __p,error_code & __ec)132*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI bool is_symlink(const path& __p, error_code& __ec) noexcept { return is_symlink(__symlink_status(__p, &__ec)); }
is_other(file_status __s)133*4bdff4beSrobert 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); }
is_other(const path & __p)134*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI bool is_other(const path& __p) { return is_other(__status(__p)); }
is_other(const path & __p,error_code & __ec)135*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI bool is_other(const path& __p, error_code& __ec) noexcept { return is_other(__status(__p, &__ec)); }
is_socket(file_status __s)136*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI bool is_socket(file_status __s) noexcept { return __s.type() == file_type::socket; }
is_socket(const path & __p)137*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI bool is_socket(const path& __p) { return is_socket(__status(__p)); }
is_socket(const path & __p,error_code & __ec)138*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI bool is_socket(const path& __p, error_code& __ec) noexcept { return is_socket(__status(__p, &__ec)); }
last_write_time(const path & __p)139*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI file_time_type last_write_time(const path& __p) { return __last_write_time(__p); }
last_write_time(const path & __p,error_code & __ec)140*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI file_time_type last_write_time(const path& __p, error_code& __ec) noexcept { return __last_write_time(__p, &__ec); }
last_write_time(const path & __p,file_time_type __t)141*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI void last_write_time(const path& __p, file_time_type __t) { __last_write_time(__p, __t); }
last_write_time(const path & __p,file_time_type __t,error_code & __ec)142*4bdff4beSrobert 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); }
143*4bdff4beSrobert _LIBCPP_FUNC_VIS void __permissions(const path&, perms, perm_options, error_code* = nullptr);
144*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI void permissions(const path& __p, perms __prms, perm_options __opts = perm_options::replace) { __permissions(__p, __prms, __opts); }
permissions(const path & __p,perms __prms,error_code & __ec)145*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI void permissions(const path& __p, perms __prms, error_code& __ec) noexcept { __permissions(__p, __prms, perm_options::replace, &__ec); }
permissions(const path & __p,perms __prms,perm_options __opts,error_code & __ec)146*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI void permissions(const path& __p, perms __prms, perm_options __opts, error_code& __ec) { __permissions(__p, __prms, __opts, &__ec); }
147*4bdff4beSrobert 
proximate(const path & __p,const path & __base,error_code & __ec)148*4bdff4beSrobert inline _LIBCPP_INLINE_VISIBILITY path proximate(const path& __p, const path& __base, error_code& __ec) {
149*4bdff4beSrobert   path __tmp = __weakly_canonical(__p, &__ec);
150*4bdff4beSrobert   if (__ec)
151*4bdff4beSrobert     return {};
152*4bdff4beSrobert   path __tmp_base = __weakly_canonical(__base, &__ec);
153*4bdff4beSrobert   if (__ec)
154*4bdff4beSrobert     return {};
155*4bdff4beSrobert   return __tmp.lexically_proximate(__tmp_base);
156*4bdff4beSrobert }
157*4bdff4beSrobert 
proximate(const path & __p,error_code & __ec)158*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI path proximate(const path& __p, error_code& __ec) { return proximate(__p, current_path(), __ec); }
159*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI path proximate(const path& __p, const path& __base = current_path()) { return __weakly_canonical(__p).lexically_proximate(__weakly_canonical(__base)); }
read_symlink(const path & __p)160*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI path read_symlink(const path& __p) { return __read_symlink(__p); }
read_symlink(const path & __p,error_code & __ec)161*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI path read_symlink(const path& __p, error_code& __ec) { return __read_symlink(__p, &__ec); }
162*4bdff4beSrobert 
relative(const path & __p,const path & __base,error_code & __ec)163*4bdff4beSrobert inline _LIBCPP_INLINE_VISIBILITY path relative(const path& __p, const path& __base, error_code& __ec) {
164*4bdff4beSrobert   path __tmp = __weakly_canonical(__p, &__ec);
165*4bdff4beSrobert   if (__ec)
166*4bdff4beSrobert     return path();
167*4bdff4beSrobert   path __tmpbase = __weakly_canonical(__base, &__ec);
168*4bdff4beSrobert   if (__ec)
169*4bdff4beSrobert     return path();
170*4bdff4beSrobert   return __tmp.lexically_relative(__tmpbase);
171*4bdff4beSrobert }
172*4bdff4beSrobert 
relative(const path & __p,error_code & __ec)173*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI path relative(const path& __p, error_code& __ec) { return relative(__p, current_path(), __ec); }
174*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI path relative(const path& __p, const path& __base = current_path()) { return __weakly_canonical(__p).lexically_relative(__weakly_canonical(__base)); }
remove_all(const path & __p)175*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI uintmax_t remove_all(const path& __p) { return __remove_all(__p); }
remove_all(const path & __p,error_code & __ec)176*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI uintmax_t remove_all(const path& __p, error_code& __ec) { return __remove_all(__p, &__ec); }
remove(const path & __p)177*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI bool remove(const path& __p) { return __remove(__p); }
remove(const path & __p,error_code & __ec)178*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI bool remove(const path& __p, error_code& __ec) noexcept { return __remove(__p, &__ec); }
rename(const path & __from,const path & __to)179*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI void rename(const path& __from, const path& __to) { return __rename(__from, __to); }
rename(const path & __from,const path & __to,error_code & __ec)180*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI void rename(const path& __from, const path& __to, error_code& __ec) noexcept { return __rename(__from, __to, &__ec); }
resize_file(const path & __p,uintmax_t __ns)181*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI void resize_file(const path& __p, uintmax_t __ns) { return __resize_file(__p, __ns); }
resize_file(const path & __p,uintmax_t __ns,error_code & __ec)182*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI void resize_file(const path& __p, uintmax_t __ns, error_code& __ec) noexcept { return __resize_file(__p, __ns, &__ec); }
183*4bdff4beSrobert _LIBCPP_FUNC_VIS space_info __space(const path&, error_code* __ec = nullptr);
space(const path & __p)184*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI space_info space(const path& __p) { return __space(__p); }
space(const path & __p,error_code & __ec)185*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI space_info space(const path& __p, error_code& __ec) noexcept { return __space(__p, &__ec); }
status(const path & __p)186*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI file_status status(const path& __p) { return __status(__p); }
status(const path & __p,error_code & __ec)187*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI file_status status(const path& __p, error_code& __ec) noexcept { return __status(__p, &__ec); }
symlink_status(const path & __p)188*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI file_status symlink_status(const path& __p) { return __symlink_status(__p); }
symlink_status(const path & __p,error_code & __ec)189*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI file_status symlink_status(const path& __p, error_code& __ec) noexcept { return __symlink_status(__p, &__ec); }
temp_directory_path()190*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI path temp_directory_path() { return __temp_directory_path(); }
temp_directory_path(error_code & __ec)191*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI path temp_directory_path(error_code& __ec) { return __temp_directory_path(&__ec); }
weakly_canonical(path const & __p)192*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI path weakly_canonical(path const& __p) { return __weakly_canonical(__p); }
weakly_canonical(path const & __p,error_code & __ec)193*4bdff4beSrobert inline _LIBCPP_HIDE_FROM_ABI path weakly_canonical(path const& __p, error_code& __ec) { return __weakly_canonical(__p, &__ec); }
194*4bdff4beSrobert 
195*4bdff4beSrobert _LIBCPP_AVAILABILITY_FILESYSTEM_POP
196*4bdff4beSrobert 
197*4bdff4beSrobert _LIBCPP_END_NAMESPACE_FILESYSTEM
198*4bdff4beSrobert 
199*4bdff4beSrobert #endif // _LIBCPP_CXX03_LANG
200*4bdff4beSrobert 
201*4bdff4beSrobert #endif // _LIBCPP___FILESYSTEM_OPERATIONS_H
202