FSNodeRight.hpp
Go to the documentation of this file.
1 
7 #include <etk/types.hpp>
8 
9 #pragma once
10 
11 namespace etk {
15  class FSNodeRight {
16  private:
17  uint16_t m_rights;
18  public:
23  FSNodeRight(int16_t _newRight = 0);
35  etk::FSNodeRight& operator= (const int32_t _newVal );
39  void clear();
45  bool isUserReadable() const;
51  bool isUserWritable() const;
57  bool isUserRunable() const;
62  void setUserReadable(bool _newStatus);
67  void setUserWritable(bool _newStatus);
72  void setUserRunable(bool _newStatus);
78  bool isGroupReadable() const;
84  bool isGroupWritable() const;
90  bool isGroupRunable() const;
95  void setGroupReadable(bool _newStatus);
100  void setGroupWritable(bool _newStatus);
105  void setGroupRunable(bool _newStatus);
111  bool isOtherReadable() const;
117  bool isOtherWritable() const;
123  bool isOtherRunable() const;
128  void setOtherReadable(bool _newStatus);
133  void setOtherWritable(bool _newStatus);
138  void setOtherRunable(bool _newStatus);
139  #if __CPP_VERSION__ >= 2011
140 
144  std::u32string getURight() const;
145  #endif
146 
150  std::string getRight() const;
151  };
153  std::ostream& operator <<(std::ostream &_os, const etk::FSNodeRight &_obj);
154 }
155 
156 
FSNodeRight(int16_t _newRight=0)
Right contructor.
void setOtherReadable(bool _newStatus)
Set the "Read status" for the "Other".
basic namespace of the etk library. (it might contain all the etk fuctions/class/structures without m...
Definition: Archive.hpp:16
void setUserWritable(bool _newStatus)
Set the "Write status" for the "User".
bool isOtherWritable() const
Get the "Write status" for the "Other".
void setGroupRunable(bool _newStatus)
Set the "Execute status" for the "Group".
bool isUserWritable() const
Get the "Write status" for the "User".
bool isOtherReadable() const
Get the "Read status" for the "Other".
bool isOtherRunable() const
Get the "execute status" for the "Other".
void setOtherRunable(bool _newStatus)
Set the "Execute status" for the "Other".
bool isGroupRunable() const
Get the "execute status" for the "Group".
void setGroupReadable(bool _newStatus)
Set the "Read status" for the "Group".
void setGroupWritable(bool _newStatus)
Set the "Write status" for the "Group".
std::string getRight() const
Get the write written in a string mode (like in linux rw-r--—)
etk::FSNodeRight & operator=(const etk::FSNodeRight &_obj)
Copy asignement operator (operator=)
bool isUserReadable() const
Get the "Read status" for the "User".
bool isUserRunable() const
Get the "execute status" for the "User".
void clear()
Clear right (set the value at 0 ==> cant not be read/write/execute.
void setUserReadable(bool _newStatus)
Set the "Read status" for the "User".
File System Right management.
Definition: FSNodeRight.hpp:15
bool isGroupWritable() const
Get the "Write status" for the "Group".
void setUserRunable(bool _newStatus)
Set the "execute status" for the "User".
void setOtherWritable(bool _newStatus)
Set the "Write status" for the "Other".
bool isGroupReadable() const
Get the "Read status" for the "Group".