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
45#if _GLIBCXX_USE_CXX11_ABI
46inline namespace __cxx11 __attribute__((__abi_tag__ (
"cxx11"))) { }
59_GLIBCXX_BEGIN_NAMESPACE_CXX11
61 class filesystem_error;
62 class directory_entry;
63 class directory_iterator;
64 class recursive_directory_iterator;
65_GLIBCXX_END_NAMESPACE_CXX11
74 enum class file_type :
signed char {
75 none = 0, not_found = -1, regular = 1, directory = 2, symlink = 3,
76 block = 4, character = 5, fifo = 6, socket = 7, unknown = 8
82 skip_existing = 1, overwrite_existing = 2, update_existing = 4,
84 copy_symlinks = 16, skip_symlinks = 32,
85 directories_only = 64, create_symlinks = 128, create_hard_links = 256
89 operator&(copy_options __x, copy_options __y)
noexcept
93 static_cast<__utype
>(__x) &
static_cast<__utype
>(__y));
97 operator|(copy_options __x, copy_options __y)
noexcept
101 static_cast<__utype
>(__x) |
static_cast<__utype
>(__y));
105 operator^(copy_options __x, copy_options __y)
noexcept
109 static_cast<__utype
>(__x) ^
static_cast<__utype
>(__y));
113 operator~(copy_options __x)
noexcept
116 return static_cast<copy_options>(~static_cast<__utype>(__x));
120 operator&=(copy_options& __x, copy_options __y)
noexcept
121 {
return __x = __x & __y; }
124 operator|=(copy_options& __x, copy_options __y)
noexcept
125 {
return __x = __x | __y; }
128 operator^=(copy_options& __x, copy_options __y)
noexcept
129 {
return __x = __x ^ __y; }
133 enum class perms :
unsigned {
159 return static_cast<perms>(
160 static_cast<__utype
>(__x) &
static_cast<__utype
>(__y));
164 operator|(perms __x, perms __y)
noexcept
167 return static_cast<perms>(
168 static_cast<__utype
>(__x) |
static_cast<__utype
>(__y));
172 operator^(perms __x, perms __y)
noexcept
175 return static_cast<perms>(
176 static_cast<__utype
>(__x) ^
static_cast<__utype
>(__y));
180 operator~(perms __x)
noexcept
183 return static_cast<perms>(~static_cast<__utype>(__x));
187 operator&=(perms& __x, perms __y)
noexcept
188 {
return __x = __x & __y; }
191 operator|=(perms& __x, perms __y)
noexcept
192 {
return __x = __x | __y; }
195 operator^=(perms& __x, perms __y)
noexcept
196 {
return __x = __x ^ __y; }
199 enum class perm_options :
unsigned {
206 constexpr perm_options
207 operator&(perm_options __x, perm_options __y)
noexcept
210 return static_cast<perm_options
>(
211 static_cast<__utype
>(__x) &
static_cast<__utype
>(__y));
214 constexpr perm_options
215 operator|(perm_options __x, perm_options __y)
noexcept
218 return static_cast<perm_options
>(
219 static_cast<__utype
>(__x) |
static_cast<__utype
>(__y));
222 constexpr perm_options
223 operator^(perm_options __x, perm_options __y)
noexcept
226 return static_cast<perm_options
>(
227 static_cast<__utype
>(__x) ^
static_cast<__utype
>(__y));
230 constexpr perm_options
231 operator~(perm_options __x)
noexcept
234 return static_cast<perm_options
>(~static_cast<__utype>(__x));
238 operator&=(perm_options& __x, perm_options __y)
noexcept
239 {
return __x = __x & __y; }
242 operator|=(perm_options& __x, perm_options __y)
noexcept
243 {
return __x = __x | __y; }
246 operator^=(perm_options& __x, perm_options __y)
noexcept
247 {
return __x = __x ^ __y; }
250 enum class directory_options :
unsigned char {
251 none = 0, follow_directory_symlink = 1, skip_permission_denied = 2
254 constexpr directory_options
255 operator&(directory_options __x, directory_options __y)
noexcept
258 return static_cast<directory_options
>(
259 static_cast<__utype
>(__x) &
static_cast<__utype
>(__y));
262 constexpr directory_options
263 operator|(directory_options __x, directory_options __y)
noexcept
266 return static_cast<directory_options
>(
267 static_cast<__utype
>(__x) |
static_cast<__utype
>(__y));
270 constexpr directory_options
271 operator^(directory_options __x, directory_options __y)
noexcept
274 return static_cast<directory_options
>(
275 static_cast<__utype
>(__x) ^
static_cast<__utype
>(__y));
278 constexpr directory_options
279 operator~(directory_options __x)
noexcept
282 return static_cast<directory_options
>(~static_cast<__utype>(__x));
285 inline directory_options&
286 operator&=(directory_options& __x, directory_options __y)
noexcept
287 {
return __x = __x & __y; }
289 inline directory_options&
290 operator|=(directory_options& __x, directory_options __y)
noexcept
291 {
return __x = __x | __y; }
293 inline directory_options&
294 operator^=(directory_options& __x, directory_options __y)
noexcept
295 {
return __x = __x ^ __y; }
297 using file_time_type = std::chrono::system_clock::time_point;
301 void copy(
const path& __from,
const path& __to, copy_options __options);
302 void copy(
const path& __from,
const path& __to, copy_options __options,
305 bool copy_file(
const path& __from,
const path& __to, copy_options __option);
306 bool copy_file(
const path& __from,
const path& __to, copy_options __option,
311 bool exists(file_status)
noexcept;
313 bool is_other(file_status)
noexcept;
315 uintmax_t file_size(
const path&);
316 uintmax_t file_size(
const path&, error_code&)
noexcept;
317 uintmax_t hard_link_count(
const path&);
318 uintmax_t hard_link_count(
const path&, error_code&)
noexcept;
319 file_time_type last_write_time(
const path&);
320 file_time_type last_write_time(
const path&, error_code&)
noexcept;
322 void permissions(
const path&, perms, perm_options, error_code&)
noexcept;
324 path proximate(
const path& __p,
const path& __base, error_code& __ec);
325 path proximate(
const path& __p,
const path& __base, error_code& __ec);
327 path relative(
const path& __p,
const path& __base, error_code& __ec);
329 file_status status(
const path&);
330 file_status status(
const path&, error_code&)
noexcept;
332 bool status_known(file_status)
noexcept;
334 file_status symlink_status(
const path&);
335 file_status symlink_status(
const path&, error_code&)
noexcept;
337 bool is_regular_file(file_status)
noexcept;
338 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.
The underlying type of an enum.