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
91 using __utype =
typename std::underlying_type<copy_options>::type;
93 static_cast<__utype
>(__x) & static_cast<__utype>(__y));
99 using __utype =
typename std::underlying_type<copy_options>::type;
101 static_cast<__utype
>(__x) | static_cast<__utype>(__y));
107 using __utype =
typename std::underlying_type<copy_options>::type;
109 static_cast<__utype
>(__x) ^ static_cast<__utype>(__y));
115 using __utype =
typename std::underlying_type<copy_options>::type;
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 {
158 using __utype =
typename std::underlying_type<perms>::type;
159 return static_cast<perms>(
160 static_cast<__utype
>(__x) & static_cast<__utype>(__y));
166 using __utype =
typename std::underlying_type<perms>::type;
167 return static_cast<perms>(
168 static_cast<__utype
>(__x) | static_cast<__utype>(__y));
174 using __utype =
typename std::underlying_type<perms>::type;
175 return static_cast<perms>(
176 static_cast<__utype
>(__x) ^ static_cast<__utype>(__y));
180 operator~(
perms __x) noexcept
182 using __utype =
typename std::underlying_type<perms>::type;
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
207 operator&(perm_options __x, perm_options __y) noexcept
209 using __utype =
typename std::underlying_type<perm_options>::type;
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
217 using __utype =
typename std::underlying_type<perm_options>::type;
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
225 using __utype =
typename std::underlying_type<perm_options>::type;
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
233 using __utype =
typename std::underlying_type<perm_options>::type;
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
257 using __utype =
typename std::underlying_type<directory_options>::type;
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
265 using __utype =
typename std::underlying_type<directory_options>::type;
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
273 using __utype =
typename std::underlying_type<directory_options>::type;
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
281 using __utype =
typename std::underlying_type<directory_options>::type;
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; }
300 using rep = duration::rep;
301 using period = duration::period;
302 using time_point = chrono::time_point<__file_clock>;
303 static constexpr
bool is_steady =
false;
307 {
return _S_from_sys(chrono::system_clock::now()); }
310 using __sys_clock = chrono::system_clock;
319 template<
typename _Dur>
321 chrono::time_point<__file_clock, _Dur>
322 _S_from_sys(
const chrono::time_point<__sys_clock, _Dur>& __t) noexcept
324 using __file_time = chrono::time_point<__file_clock, _Dur>;
325 return __file_time{__t.time_since_epoch()} - _S_epoch_diff;
329 template<
typename _Dur>
331 chrono::time_point<__sys_clock, _Dur>
332 _S_to_sys(
const chrono::time_point<__file_clock, _Dur>& __t) noexcept
334 using __sys_time = chrono::time_point<__sys_clock, _Dur>;
335 return __sys_time{__t.time_since_epoch()} + _S_epoch_diff;
339 using file_time_type = __file_clock::time_point;
343 void copy(
const path& __from,
const path& __to,
copy_options __options);
344 void copy(
const path& __from,
const path& __to,
copy_options __options,
347 bool copy_file(
const path& __from,
const path& __to,
copy_options __option);
348 bool copy_file(
const path& __from,
const path& __to,
copy_options __option,
353 bool exists(file_status) noexcept;
355 bool is_other(file_status) noexcept;
357 uintmax_t file_size(
const path&);
358 uintmax_t file_size(
const path&, error_code&) noexcept;
359 uintmax_t hard_link_count(
const path&);
360 uintmax_t hard_link_count(
const path&, error_code&) noexcept;
361 file_time_type last_write_time(
const path&);
362 file_time_type last_write_time(
const path&, error_code&) noexcept;
364 void permissions(
const path&,
perms, perm_options, error_code&) noexcept;
366 path proximate(
const path& __p,
const path&
__base, error_code& __ec);
367 path proximate(
const path& __p,
const path&
__base, error_code& __ec);
369 path relative(
const path& __p,
const path&
__base, error_code& __ec);
371 file_status status(
const path&);
372 file_status status(
const path&, error_code&) noexcept;
374 bool status_known(file_status) noexcept;
376 file_status symlink_status(
const path&);
377 file_status symlink_status(
const path&, error_code&) noexcept;
379 bool is_regular_file(file_status) noexcept;
380 bool is_symlink(file_status) noexcept;
385 _GLIBCXX_END_NAMESPACE_VERSION
390 #endif // _GLIBCXX_FS_FWD_H ISO C++ entities toplevel namespace is std.
bitset< _Nb > operator^(const bitset< _Nb > &__x, const bitset< _Nb > &__y) noexcept
Global bitwise operations on bitsets.
duration< int64_t > seconds
seconds
bitset< _Nb > operator &(const bitset< _Nb > &__x, const bitset< _Nb > &__y) noexcept
Global bitwise operations on bitsets.
duration< int64_t, nano > nanoseconds
nanoseconds
bitset< _Nb > operator|(const bitset< _Nb > &__x, const bitset< _Nb > &__y) noexcept
Global bitwise operations on bitsets.
copy_options
Bitmask type.
_Iterator __base(_Iterator __it)