Path: blob/main/contrib/llvm-project/libcxx/include/__filesystem/copy_options.h
35262 views
// -*- C++ -*-1//===----------------------------------------------------------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//89#ifndef _LIBCPP___FILESYSTEM_COPY_OPTIONS_H10#define _LIBCPP___FILESYSTEM_COPY_OPTIONS_H1112#include <__config>1314#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)15# pragma GCC system_header16#endif1718#if _LIBCPP_STD_VER >= 171920_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM2122enum class copy_options : unsigned short {23none = 0,24skip_existing = 1,25overwrite_existing = 2,26update_existing = 4,27recursive = 8,28copy_symlinks = 16,29skip_symlinks = 32,30directories_only = 64,31create_symlinks = 128,32create_hard_links = 256,33__in_recursive_copy = 512,34};3536_LIBCPP_HIDE_FROM_ABI inline constexpr copy_options operator&(copy_options __lhs, copy_options __rhs) {37return static_cast<copy_options>(static_cast<unsigned short>(__lhs) & static_cast<unsigned short>(__rhs));38}3940_LIBCPP_HIDE_FROM_ABI inline constexpr copy_options operator|(copy_options __lhs, copy_options __rhs) {41return static_cast<copy_options>(static_cast<unsigned short>(__lhs) | static_cast<unsigned short>(__rhs));42}4344_LIBCPP_HIDE_FROM_ABI inline constexpr copy_options operator^(copy_options __lhs, copy_options __rhs) {45return static_cast<copy_options>(static_cast<unsigned short>(__lhs) ^ static_cast<unsigned short>(__rhs));46}4748_LIBCPP_HIDE_FROM_ABI inline constexpr copy_options operator~(copy_options __lhs) {49return static_cast<copy_options>(~static_cast<unsigned short>(__lhs));50}5152_LIBCPP_HIDE_FROM_ABI inline copy_options& operator&=(copy_options& __lhs, copy_options __rhs) {53return __lhs = __lhs & __rhs;54}5556_LIBCPP_HIDE_FROM_ABI inline copy_options& operator|=(copy_options& __lhs, copy_options __rhs) {57return __lhs = __lhs | __rhs;58}5960_LIBCPP_HIDE_FROM_ABI inline copy_options& operator^=(copy_options& __lhs, copy_options __rhs) {61return __lhs = __lhs ^ __rhs;62}6364_LIBCPP_END_NAMESPACE_FILESYSTEM6566#endif // _LIBCPP_STD_VER >= 176768#endif // _LIBCPP___FILESYSTEM_COPY_OPTIONS_H697071