permissions getter methods
Stefan Schuermans

Stefan Schuermans commited on 2020-08-24 20:09:31
Showing 2 changed files, with 28 additions and 0 deletions.

... ...
@@ -30,6 +30,18 @@ public:
30 30
    */
31 31
   void apply(boost::filesystem::path const &path) const;
32 32
 
33
+  /// return permissions to set
34
+  Flags getSet() const;
35
+
36
+  /// return permissions to set conditionally on usrexec/dir
37
+  Flags getSetCond() const;
38
+
39
+  /// return permissions to clear
40
+  Flags getClear() const;
41
+
42
+  /// return permissions to clear conditionally on usrexec/dir
43
+  Flags getClearCond() const;
44
+
33 45
 protected:
34 46
   /// convert flags into boost filesystem permissions
35 47
   static boost::filesystem::perms flags2perms(Flags flags);
... ...
@@ -105,6 +105,22 @@ void Permissions::apply(boost::filesystem::path const &path) const {
105 105
   }
106 106
 }
107 107
 
108
+Permissions::Flags Permissions::getSet() const {
109
+  return set;
110
+}
111
+
112
+Permissions::Flags Permissions::getSetCond() const {
113
+  return setCond;
114
+}
115
+
116
+Permissions::Flags Permissions::getClear() const {
117
+  return clear;
118
+}
119
+
120
+Permissions::Flags Permissions::getClearCond() const {
121
+  return clearCond;
122
+}
123
+
108 124
 boost::filesystem::perms Permissions::flags2perms(Flags flags) {
109 125
   using fsp = boost::filesystem::perms;
110 126
   fsp perms = fsp::no_perms;
111 127