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
71 enum class file_type :
signed char {
72 none = 0, not_found = -1, regular = 1, directory = 2, symlink = 3,
73 block = 4, character = 5, fifo = 6, socket = 7, unknown = 8
79 skip_existing = 1, overwrite_existing = 2, update_existing = 4,
81 copy_symlinks = 16, skip_symlinks = 32,
82 directories_only = 64, create_symlinks = 128, create_hard_links = 256
88 using __utype =
typename std::underlying_type<copy_options>::type;
90 static_cast<__utype
>(__x) &
static_cast<__utype
>(__y));
96 using __utype =
typename std::underlying_type<copy_options>::type;
98 static_cast<__utype
>(__x) |
static_cast<__utype
>(__y));
104 using __utype =
typename std::underlying_type<copy_options>::type;
106 static_cast<__utype
>(__x) ^
static_cast<__utype
>(__y));
112 using __utype =
typename std::underlying_type<copy_options>::type;
113 return static_cast<copy_options>(~static_cast<__utype>(__x));
118 {
return __x = __x & __y; }
122 {
return __x = __x | __y; }
126 {
return __x = __x ^ __y; }
130 enum class perms :
unsigned {
155 using __utype =
typename std::underlying_type<perms>::type;
156 return static_cast<perms>(
157 static_cast<__utype
>(__x) &
static_cast<__utype
>(__y));
163 using __utype =
typename std::underlying_type<perms>::type;
164 return static_cast<perms>(
165 static_cast<__utype
>(__x) |
static_cast<__utype
>(__y));
171 using __utype =
typename std::underlying_type<perms>::type;
172 return static_cast<perms>(
173 static_cast<__utype
>(__x) ^
static_cast<__utype
>(__y));
177 operator~(
perms __x)
noexcept
179 using __utype =
typename std::underlying_type<perms>::type;
180 return static_cast<perms>(~static_cast<__utype>(__x));
185 {
return __x = __x & __y; }
189 {
return __x = __x | __y; }
193 {
return __x = __x ^ __y; }
196 enum class perm_options :
unsigned {
203 constexpr perm_options
204 operator&(perm_options __x, perm_options __y)
noexcept
206 using __utype =
typename std::underlying_type<perm_options>::type;
207 return static_cast<perm_options
>(
208 static_cast<__utype
>(__x) &
static_cast<__utype
>(__y));
211 constexpr perm_options
212 operator|(perm_options __x, perm_options __y)
noexcept
214 using __utype =
typename std::underlying_type<perm_options>::type;
215 return static_cast<perm_options
>(
216 static_cast<__utype
>(__x) |
static_cast<__utype
>(__y));
219 constexpr perm_options
220 operator^(perm_options __x, perm_options __y)
noexcept
222 using __utype =
typename std::underlying_type<perm_options>::type;
223 return static_cast<perm_options
>(
224 static_cast<__utype
>(__x) ^
static_cast<__utype
>(__y));
227 constexpr perm_options
228 operator~(perm_options __x)
noexcept
230 using __utype =
typename std::underlying_type<perm_options>::type;
231 return static_cast<perm_options
>(~static_cast<__utype>(__x));
235 operator&=(perm_options& __x, perm_options __y)
noexcept
236 {
return __x = __x & __y; }
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 enum class directory_options :
unsigned char {
248 none = 0, follow_directory_symlink = 1, skip_permission_denied = 2
251 constexpr directory_options
252 operator&(directory_options __x, directory_options __y)
noexcept
254 using __utype =
typename std::underlying_type<directory_options>::type;
255 return static_cast<directory_options
>(
256 static_cast<__utype
>(__x) &
static_cast<__utype
>(__y));
259 constexpr directory_options
260 operator|(directory_options __x, directory_options __y)
noexcept
262 using __utype =
typename std::underlying_type<directory_options>::type;
263 return static_cast<directory_options
>(
264 static_cast<__utype
>(__x) |
static_cast<__utype
>(__y));
267 constexpr directory_options
268 operator^(directory_options __x, directory_options __y)
noexcept
270 using __utype =
typename std::underlying_type<directory_options>::type;
271 return static_cast<directory_options
>(
272 static_cast<__utype
>(__x) ^
static_cast<__utype
>(__y));
275 constexpr directory_options
276 operator~(directory_options __x)
noexcept
278 using __utype =
typename std::underlying_type<directory_options>::type;
279 return static_cast<directory_options
>(~static_cast<__utype>(__x));
282 inline directory_options&
283 operator&=(directory_options& __x, directory_options __y)
noexcept
284 {
return __x = __x & __y; }
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 using file_time_type = __file_clock::time_point;
298 void copy(
const path& __from,
const path& __to,
copy_options __options);
299 void copy(
const path& __from,
const path& __to,
copy_options __options,
302 bool copy_file(
const path& __from,
const path& __to,
copy_options __option);
303 bool copy_file(
const path& __from,
const path& __to,
copy_options __option,
308 bool exists(file_status)
noexcept;
310 bool is_other(file_status)
noexcept;
312 uintmax_t file_size(
const path&);
313 uintmax_t file_size(
const path&, error_code&)
noexcept;
314 uintmax_t hard_link_count(
const path&);
315 uintmax_t hard_link_count(
const path&, error_code&)
noexcept;
316 file_time_type last_write_time(
const path&);
317 file_time_type last_write_time(
const path&, error_code&)
noexcept;
319 void permissions(
const path&,
perms, perm_options, error_code&)
noexcept;
321 path proximate(
const path& __p,
const path&
__base, error_code& __ec);
322 path proximate(
const path& __p,
const path&
__base, error_code& __ec);
324 path relative(
const path& __p,
const path&
__base, error_code& __ec);
326 file_status status(
const path&);
327 file_status status(
const path&, error_code&)
noexcept;
329 bool status_known(file_status)
noexcept;
331 file_status symlink_status(
const path&);
332 file_status symlink_status(
const path&, error_code&)
noexcept;
334 bool is_regular_file(file_status)
noexcept;
335 bool is_symlink(file_status)
noexcept;
339_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.
constexpr _Iterator __base(_Iterator __it)