PLCnext API Documentation 25.0.2.69
Traits.hpp
1
2//
3// Copyright Phoenix Contact GmbH & Co. KG
4//
6#pragma once
8#include "Arp/Base/Core/Enum.hxx"
9
10// DO NOT MODIFY THIS FILE, THIS FILE IS AUTOGENERATED
11
13{
14
18enum class Traits : int32
19{
23 None = 0,
24
30 Permissions = 1, // (1 << 0)
31
35 LastWriteTime = 2, // (1 << 1)
36
40 Length = 4, // (1 << 2)
41
45 Crc32 = 8, // (1 << 3)
46
51 TotalPermissions = 16, // (1 << 4)
52};
53
54constexpr Traits operator|(Traits lhs, Traits rhs)
55{
56 return static_cast<Traits>(static_cast<int32>(lhs) | static_cast<int32>(rhs));
57}
58
59constexpr Traits operator&(Traits lhs, Traits rhs)
60{
61 return static_cast<Traits>(static_cast<int32>(lhs) & static_cast<int32>(rhs));
62}
63
64constexpr Traits& operator|=(Traits& lhs, Traits rhs)
65{
66 return (lhs = static_cast<Traits>(static_cast<int32>(lhs) | static_cast<int32>(rhs)));
67}
68
69constexpr Traits& operator&=(Traits& lhs, Traits rhs)
70{
71 return (lhs = static_cast<Traits>(static_cast<int32>(lhs) & static_cast<int32>(rhs)));
72}
73
74constexpr Traits operator~(Traits arg)
75{
76 return static_cast<Traits>(~static_cast<int32>(arg));
77}
78
80// global stream operators of enum Traits for logging and parsing
81ARP_EXPORT std::ostream& operator<<(std::ostream& os, Traits value);
82ARP_EXPORT std::istream& operator>>(std::istream& is, Traits& value);
83
84} // end of namespace Arp::System::Commons::Services::Io
85
87// template specialization of Traits formatter
88template<> struct fmt::formatter<Arp::System::Commons::Services::Io::Traits> : public fmt::ostream_formatter {};
std::int32_t int32
The Arp integer type of 4 byte size.
Definition: PrimitiveTypes.hpp:35
Namespace for services to access the filesystem
Permissions
Provides attributes for files and directories.
Definition: Permissions.hpp:19
Traits
This enum is used by several file services to specify the file traits to get or set,...
Definition: Traits.hpp:19
@ Crc32
Specifies the CRC32 value of the file as System.Int32.
@ TotalPermissions
Specifies the file permissions mask as Arp.System.Commons.Services.Io.Permissions mask....
@ Length
Specifies the size of the file in bytes as System.Int64.
@ LastWriteTime
Specifies the time of last write access or last modified time, respectively as System....
Root namespace for the PLCnext API