1*0eae32dcSDimitry Andric // -*- C++ -*- 2*0eae32dcSDimitry Andric //===----------------------------------------------------------------------===// 3*0eae32dcSDimitry Andric // 4*0eae32dcSDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 5*0eae32dcSDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 6*0eae32dcSDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7*0eae32dcSDimitry Andric // 8*0eae32dcSDimitry Andric //===----------------------------------------------------------------------===// 9*0eae32dcSDimitry Andric 10*0eae32dcSDimitry Andric #ifndef _LIBCPP___FILESYSTEM_FILE_STATUS_H 11*0eae32dcSDimitry Andric #define _LIBCPP___FILESYSTEM_FILE_STATUS_H 12*0eae32dcSDimitry Andric 13*0eae32dcSDimitry Andric #include <__availability> 14*0eae32dcSDimitry Andric #include <__config> 15*0eae32dcSDimitry Andric #include <__filesystem/file_type.h> 16*0eae32dcSDimitry Andric #include <__filesystem/perms.h> 17*0eae32dcSDimitry Andric 18*0eae32dcSDimitry Andric #ifndef _LIBCPP_CXX03_LANG 19*0eae32dcSDimitry Andric 20*0eae32dcSDimitry Andric _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM 21*0eae32dcSDimitry Andric 22*0eae32dcSDimitry Andric _LIBCPP_AVAILABILITY_FILESYSTEM_PUSH 23*0eae32dcSDimitry Andric 24*0eae32dcSDimitry Andric class _LIBCPP_TYPE_VIS file_status { 25*0eae32dcSDimitry Andric public: 26*0eae32dcSDimitry Andric // constructors 27*0eae32dcSDimitry Andric _LIBCPP_INLINE_VISIBILITY 28*0eae32dcSDimitry Andric file_status() noexcept : file_status(file_type::none) {} 29*0eae32dcSDimitry Andric _LIBCPP_INLINE_VISIBILITY 30*0eae32dcSDimitry Andric explicit file_status(file_type __ft, perms __prms = perms::unknown) noexcept 31*0eae32dcSDimitry Andric : __ft_(__ft), 32*0eae32dcSDimitry Andric __prms_(__prms) {} 33*0eae32dcSDimitry Andric 34*0eae32dcSDimitry Andric file_status(const file_status&) noexcept = default; 35*0eae32dcSDimitry Andric file_status(file_status&&) noexcept = default; 36*0eae32dcSDimitry Andric 37*0eae32dcSDimitry Andric _LIBCPP_INLINE_VISIBILITY 38*0eae32dcSDimitry Andric ~file_status() {} 39*0eae32dcSDimitry Andric 40*0eae32dcSDimitry Andric file_status& operator=(const file_status&) noexcept = default; 41*0eae32dcSDimitry Andric file_status& operator=(file_status&&) noexcept = default; 42*0eae32dcSDimitry Andric 43*0eae32dcSDimitry Andric // observers 44*0eae32dcSDimitry Andric _LIBCPP_INLINE_VISIBILITY 45*0eae32dcSDimitry Andric file_type type() const noexcept { return __ft_; } 46*0eae32dcSDimitry Andric 47*0eae32dcSDimitry Andric _LIBCPP_INLINE_VISIBILITY 48*0eae32dcSDimitry Andric perms permissions() const noexcept { return __prms_; } 49*0eae32dcSDimitry Andric 50*0eae32dcSDimitry Andric // modifiers 51*0eae32dcSDimitry Andric _LIBCPP_INLINE_VISIBILITY 52*0eae32dcSDimitry Andric void type(file_type __ft) noexcept { __ft_ = __ft; } 53*0eae32dcSDimitry Andric 54*0eae32dcSDimitry Andric _LIBCPP_INLINE_VISIBILITY 55*0eae32dcSDimitry Andric void permissions(perms __p) noexcept { __prms_ = __p; } 56*0eae32dcSDimitry Andric 57*0eae32dcSDimitry Andric private: 58*0eae32dcSDimitry Andric file_type __ft_; 59*0eae32dcSDimitry Andric perms __prms_; 60*0eae32dcSDimitry Andric }; 61*0eae32dcSDimitry Andric 62*0eae32dcSDimitry Andric _LIBCPP_AVAILABILITY_FILESYSTEM_POP 63*0eae32dcSDimitry Andric 64*0eae32dcSDimitry Andric _LIBCPP_END_NAMESPACE_FILESYSTEM 65*0eae32dcSDimitry Andric 66*0eae32dcSDimitry Andric #endif // _LIBCPP_CXX03_LANG 67*0eae32dcSDimitry Andric 68*0eae32dcSDimitry Andric #endif // _LIBCPP___FILESYSTEM_FILE_STATUS_H 69