30#ifndef _GLIBCXX_FS_FWD_H
31#define _GLIBCXX_FS_FWD_H 1
33#if __cplusplus >= 201703L
35#include <system_error>
39namespace std _GLIBCXX_VISIBILITY(default)
41_GLIBCXX_BEGIN_NAMESPACE_VERSION
50#if _GLIBCXX_USE_CXX11_ABI
51inline namespace __cxx11 __attribute__((__abi_tag__ (
"cxx11"))) { }
56_GLIBCXX_BEGIN_NAMESPACE_CXX11
58 class filesystem_error;
59 class directory_entry;
60 class directory_iterator;
61 class recursive_directory_iterator;
62_GLIBCXX_END_NAMESPACE_CXX11
70#if __cpp_impl_three_way_comparison >= 201907L
71 friend bool operator==(
const space_info&,
const space_info&) =
default;
75 enum class file_type :
signed char {
76 none = 0, not_found = -1, regular = 1, directory = 2, symlink = 3,
77 block = 4, character = 5, fifo = 6, socket = 7, unknown = 8
83 skip_existing = 1, overwrite_existing = 2, update_existing = 4,
85 copy_symlinks = 16, skip_symlinks = 32,
86 directories_only = 64, create_symlinks = 128, create_hard_links = 256
90 operator&(copy_options __x, copy_options __y)
noexcept
94 static_cast<__utype
>(__x) &
static_cast<__utype
>(__y));
98 operator|(copy_options __x, copy_options __y)
noexcept
102 static_cast<__utype
>(__x) |
static_cast<__utype
>(__y));
106 operator^(copy_options __x, copy_options __y)
noexcept
110 static_cast<__utype
>(__x) ^
static_cast<__utype
>(__y));
114 operator~(copy_options __x)
noexcept
117 return static_cast<copy_options>(~static_cast<__utype>(__x));
121 operator&=(copy_options& __x, copy_options __y)
noexcept
122 {
return __x = __x & __y; }
125 operator|=(copy_options& __x, copy_options __y)
noexcept
126 {
return __x = __x | __y; }
129 operator^=(copy_options& __x, copy_options __y)
noexcept
130 {
return __x = __x ^ __y; }
134 enum class perms :
unsigned {
160 return static_cast<perms>(
161 static_cast<__utype
>(__x) &
static_cast<__utype
>(__y));
168 return static_cast<perms>(
169 static_cast<__utype
>(__x) |
static_cast<__utype
>(__y));
176 return static_cast<perms>(
177 static_cast<__utype
>(__x) ^
static_cast<__utype
>(__y));
181 operator~(perms __x)
noexcept
184 return static_cast<perms>(~static_cast<__utype>(__x));
188 operator&=(perms& __x, perms __y)
noexcept
189 {
return __x = __x & __y; }
192 operator|=(perms& __x, perms __y)
noexcept
193 {
return __x = __x | __y; }
196 operator^=(perms& __x, perms __y)
noexcept
197 {
return __x = __x ^ __y; }
200 enum class perm_options :
unsigned {
207 constexpr perm_options
208 operator&(perm_options __x, perm_options __y)
noexcept
211 return static_cast<perm_options
>(
212 static_cast<__utype
>(__x) &
static_cast<__utype
>(__y));
215 constexpr perm_options
216 operator|(perm_options __x, perm_options __y)
noexcept
219 return static_cast<perm_options
>(
220 static_cast<__utype
>(__x) |
static_cast<__utype
>(__y));
223 constexpr perm_options
224 operator^(perm_options __x, perm_options __y)
noexcept
227 return static_cast<perm_options
>(
228 static_cast<__utype
>(__x) ^
static_cast<__utype
>(__y));
231 constexpr perm_options
232 operator~(perm_options __x)
noexcept
235 return static_cast<perm_options
>(~static_cast<__utype>(__x));
239 operator&=(perm_options& __x, perm_options __y)
noexcept
240 {
return __x = __x & __y; }
243 operator|=(perm_options& __x, perm_options __y)
noexcept
244 {
return __x = __x | __y; }
247 operator^=(perm_options& __x, perm_options __y)
noexcept
248 {
return __x = __x ^ __y; }
251 enum class directory_options :
unsigned char {
252 none = 0, follow_directory_symlink = 1, skip_permission_denied = 2
255 constexpr directory_options
256 operator&(directory_options __x, directory_options __y)
noexcept
259 return static_cast<directory_options
>(
260 static_cast<__utype
>(__x) &
static_cast<__utype
>(__y));
263 constexpr directory_options
264 operator|(directory_options __x, directory_options __y)
noexcept
267 return static_cast<directory_options
>(
268 static_cast<__utype
>(__x) |
static_cast<__utype
>(__y));
271 constexpr directory_options
272 operator^(directory_options __x, directory_options __y)
noexcept
275 return static_cast<directory_options
>(
276 static_cast<__utype
>(__x) ^
static_cast<__utype
>(__y));
279 constexpr directory_options
280 operator~(directory_options __x)
noexcept
283 return static_cast<directory_options
>(~static_cast<__utype>(__x));
286 inline directory_options&
287 operator&=(directory_options& __x, directory_options __y)
noexcept
288 {
return __x = __x & __y; }
290 inline directory_options&
291 operator|=(directory_options& __x, directory_options __y)
noexcept
292 {
return __x = __x | __y; }
294 inline directory_options&
295 operator^=(directory_options& __x, directory_options __y)
noexcept
296 {
return __x = __x ^ __y; }
298 using file_time_type = __file_clock::time_point;
302 void copy(
const path& __from,
const path& __to, copy_options __options);
303 void copy(
const path& __from,
const path& __to, copy_options __options,
306 bool copy_file(
const path& __from,
const path& __to, copy_options __option);
307 bool copy_file(
const path& __from,
const path& __to, copy_options __option,
312 bool exists(file_status)
noexcept;
314 bool is_other(file_status)
noexcept;
316 uintmax_t file_size(
const path&);
317 uintmax_t file_size(
const path&, error_code&)
noexcept;
318 uintmax_t hard_link_count(
const path&);
319 uintmax_t hard_link_count(
const path&, error_code&)
noexcept;
320 file_time_type last_write_time(
const path&);
321 file_time_type last_write_time(
const path&, error_code&)
noexcept;
323 void permissions(
const path&, perms, perm_options, error_code&)
noexcept;
325 path proximate(
const path& __p,
const path& __base, error_code& __ec);
326 path proximate(
const path& __p,
const path& __base, error_code& __ec);
328 path relative(
const path& __p,
const path& __base, error_code& __ec);
330 file_status status(
const path&);
331 file_status status(
const path&, error_code&)
noexcept;
333 bool status_known(file_status)
noexcept;
335 file_status symlink_status(
const path&);
336 file_status symlink_status(
const path&, error_code&)
noexcept;
338 bool is_regular_file(file_status)
noexcept;
339 bool is_symlink(file_status)
noexcept;
343_GLIBCXX_END_NAMESPACE_VERSION
copy_options
Bitmask type.
ISO C++ entities toplevel namespace is std.
bitset< _Nb > operator&(const bitset< _Nb > &__x, const bitset< _Nb > &__y) noexcept
Global bitwise operations on bitsets.
bitset< _Nb > operator|(const bitset< _Nb > &__x, const bitset< _Nb > &__y) noexcept
Global bitwise operations on bitsets.
bitset< _Nb > operator^(const bitset< _Nb > &__x, const bitset< _Nb > &__y) noexcept
Global bitwise operations on bitsets.