azure-storage-files-shares
share_file_attributes.hpp
1 // Copyright (c) Microsoft Corporation. All rights reserved.
2 // SPDX-License-Identifier: MIT
3 
4 #pragma once
5 
6 #include <string>
7 #include <vector>
8 
10 
11 namespace Azure { namespace Storage { namespace Files { namespace Shares { namespace Models {
12 
13  class FileAttributes final {
14  public:
15  FileAttributes() = default;
16  explicit FileAttributes(const std::string& value);
17 
18  std::string ToString() const;
19  const std::vector<std::string> GetValues() const { return m_value; }
20 
21  bool operator==(const FileAttributes& other) const { return m_value == other.m_value; }
22  bool operator!=(const FileAttributes& other) const { return !(*this == other); }
23 
24  FileAttributes operator|(const FileAttributes& other) const;
25  FileAttributes operator&(const FileAttributes& other) const;
26  FileAttributes operator^(const FileAttributes& other) const;
27 
28  FileAttributes& operator|=(const FileAttributes& other)
29  {
30  *this = *this | other;
31  return *this;
32  }
33 
34  FileAttributes& operator&=(const FileAttributes& other)
35  {
36  *this = *this & other;
37  return *this;
38  }
39 
40  FileAttributes& operator^=(const FileAttributes& other)
41  {
42  *this = *this ^ other;
43  return *this;
44  }
45 
50 
56 
62 
68 
73 
78 
87 
92 
98 
105 
106  private:
107  std::vector<std::string> m_value;
108  };
109 
110 }}}}} // namespace Azure::Storage::Files::Shares::Models
Azure::Storage::Files::Shares::Models::FileAttributes::Directory
AZ_STORAGE_FILES_SHARES_DLLEXPORT static const FileAttributes Directory
The file is a directory.
Definition: share_file_attributes.hpp:72
Azure::Storage::Files::Shares::Models::FileAttributes::ReadOnly
AZ_STORAGE_FILES_SHARES_DLLEXPORT static const FileAttributes ReadOnly
The File or Directory is read-only.
Definition: share_file_attributes.hpp:49
AZ_STORAGE_FILES_SHARES_DLLEXPORT
#define AZ_STORAGE_FILES_SHARES_DLLEXPORT
Applies DLL export attribute, when applicable.
Definition: dll_import_export.hpp:37
Azure::Storage::Files::Shares::Models::FileAttributes
Definition: share_file_attributes.hpp:13
Azure::Storage::Files::Shares::Models::FileAttributes::Offline
AZ_STORAGE_FILES_SHARES_DLLEXPORT static const FileAttributes Offline
The file or directory is offline. The data of the file is not immediately available.
Definition: share_file_attributes.hpp:91
Azure::Storage::Files::Shares::Models::FileAttributes::Archive
AZ_STORAGE_FILES_SHARES_DLLEXPORT static const FileAttributes Archive
The file is a candidate for backup or removal.
Definition: share_file_attributes.hpp:77
Azure::Storage::Files::Shares::Models::FileAttributes::System
AZ_STORAGE_FILES_SHARES_DLLEXPORT static const FileAttributes System
The File or Directory is a systemfile. That is, the file is part of the operating system or is used e...
Definition: share_file_attributes.hpp:61
Azure::Storage::Files::Shares::Models::FileAttributes::Temporary
AZ_STORAGE_FILES_SHARES_DLLEXPORT static const FileAttributes Temporary
The file or directory is temporary. A temporary file contains data that is needed while an applicatio...
Definition: share_file_attributes.hpp:86
Azure::Storage::Files::Shares::Models::FileAttributes::None
AZ_STORAGE_FILES_SHARES_DLLEXPORT static const FileAttributes None
The file or directory is a standard file that has no special attributes. This attribute is valid only...
Definition: share_file_attributes.hpp:67
Azure::Storage::Files::Shares::Models::FileAttributes::NoScrubData
AZ_STORAGE_FILES_SHARES_DLLEXPORT static const FileAttributes NoScrubData
The file or directory is excluded from the data integrity scan. When this value is applied to a direc...
Definition: share_file_attributes.hpp:104
Azure::Storage::Files::Shares::Models::FileAttributes::NotContentIndexed
AZ_STORAGE_FILES_SHARES_DLLEXPORT static const FileAttributes NotContentIndexed
The file or directory will not be indexed by the operating system's content indexing service.
Definition: share_file_attributes.hpp:97
dll_import_export.hpp
DLL export macro.
Azure::Storage::Files::Shares::Models::FileAttributes::Hidden
AZ_STORAGE_FILES_SHARES_DLLEXPORT static const FileAttributes Hidden
The File or Directory is hidden, and thus is not included in an ordinary directory listing.
Definition: share_file_attributes.hpp:55