30 #ifndef _GLIBCXX_FS_FWD_H
31 #define _GLIBCXX_FS_FWD_H 1
33 #if __cplusplus >= 201703L
35 #include <system_error>
39 namespace std _GLIBCXX_VISIBILITY(default)
41 _GLIBCXX_BEGIN_NAMESPACE_VERSION
45 #if _GLIBCXX_USE_CXX11_ABI
46 inline 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
93 static_cast<__utype
>(__x) & static_cast<__utype>(__y));
101 static_cast<__utype
>(__x) | static_cast<__utype>(__y));
109 static_cast<__utype
>(__x) ^ static_cast<__utype>(__y));
116 return static_cast<copy_options>(~static_cast<__utype>(__x));
121 {
return __x = __x & __y; }
125 {
return __x = __x | __y; }
129 {
return __x = __x ^ __y; }
133 enum class perms : unsigned {
159 return static_cast<perms>(
160 static_cast<__utype
>(__x) & static_cast<__utype>(__y));
167 return static_cast<perms>(
168 static_cast<__utype
>(__x) | static_cast<__utype>(__y));
175 return static_cast<perms>(
176 static_cast<__utype
>(__x) ^ static_cast<__utype>(__y));
183 return static_cast<perms>(~static_cast<__utype>(__x));
188 {
return __x = __x & __y; }
192 {
return __x = __x | __y; }
196 {
return __x = __x ^ __y; }
199 enum class perm_options : unsigned {
206 constexpr perm_options
210 return static_cast<perm_options
>(
211 static_cast<__utype
>(__x) & static_cast<__utype>(__y));
214 constexpr perm_options
218 return static_cast<perm_options
>(
219 static_cast<__utype
>(__x) | static_cast<__utype>(__y));
222 constexpr perm_options
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
258 return static_cast<directory_options
>(
259 static_cast<__utype
>(__x) & static_cast<__utype>(__y));
262 constexpr directory_options
266 return static_cast<directory_options
>(
267 static_cast<__utype
>(__x) | static_cast<__utype>(__y));
270 constexpr directory_options
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,
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
348 #endif // _GLIBCXX_FS_FWD_H
bitset< _Nb > operator&(const bitset< _Nb > &__x, const bitset< _Nb > &__y) noexcept
Global bitwise operations on bitsets.
enable_if< ::__array_traits< _Tp, _Nm >::_Is_swappable::value >::type noexcept(noexcept(__one.swap(__two)))
swap
copy_options
Bitmask type.
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.
The underlying type of an enum.