Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
include/experimental/filesystem
Show First 20 Lines • Show All 254 Lines • ▼ Show 20 Lines | |||||
#include <__undef_macros> | #include <__undef_macros> | ||||
#ifndef _LIBCPP_CXX03_LANG | #ifndef _LIBCPP_CXX03_LANG | ||||
#define __cpp_lib_experimental_filesystem 201406 | #define __cpp_lib_experimental_filesystem 201406 | ||||
_LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL_FILESYSTEM | _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL_FILESYSTEM | ||||
typedef chrono::time_point<std::chrono::system_clock> file_time_type; | struct _FilesystemClock { | ||||
#if !defined(_LIBCPP_HAS_NO_INT128) | |||||
typedef __int128_t rep; | |||||
typedef nano period; | |||||
#else | |||||
typedef long long rep; | |||||
typedef nano period; | |||||
#endif | |||||
typedef chrono::duration<rep, period> duration; | |||||
typedef chrono::time_point<_FilesystemClock> time_point; | |||||
static _LIBCPP_CONSTEXPR_AFTER_CXX11 const bool is_steady = false; | |||||
_LIBCPP_FUNC_VIS static time_point now() noexcept; | |||||
_LIBCPP_INLINE_VISIBILITY | |||||
static time_t to_time_t(const time_point& __t) noexcept { | |||||
typedef chrono::duration<rep> __secs; | |||||
return time_t( | |||||
chrono::duration_cast<__secs>(__t.time_since_epoch()).count()); | |||||
} | |||||
_LIBCPP_INLINE_VISIBILITY | |||||
static time_point from_time_t(time_t __t) noexcept { | |||||
typedef chrono::duration<rep> __secs; | |||||
return time_point(__secs(__t)); | |||||
} | |||||
}; | |||||
typedef chrono::time_point<_FilesystemClock> file_time_type; | |||||
struct _LIBCPP_TYPE_VIS space_info | struct _LIBCPP_TYPE_VIS space_info | ||||
{ | { | ||||
uintmax_t capacity; | uintmax_t capacity; | ||||
uintmax_t free; | uintmax_t free; | ||||
uintmax_t available; | uintmax_t available; | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 991 Lines • Show Last 20 Lines |