libzypp: zypp::filesystem::StatMode Class Reference

libzypp 17.38.15

zypp::filesystem::StatMode Class Reference

Wrapper class for mode_t values as derived from ::stat. More...

`#include <zypp-core/fs/PathInfo.h>`

## Public Member Functions
| StatMode (const mode_t &mode_r=0)
| Ctor taking mode_t value from ::stat.
Query FileType.
FileType | fileType () const
bool | isFile () const
bool | isDir () const
bool | isLink () const
bool | isChr () const
bool | isBlk () const
bool | isFifo () const
bool | isSock () const
Query user permissions.
bool | isRUsr () const
bool | isWUsr () const
bool | isXUsr () const
bool | isR () const
| Short for isRUsr().
bool | isW () const
| Short for isWUsr().
bool | isX () const
| Short for isXUsr().
Query group permissions.
bool | isRGrp () const
bool | isWGrp () const
bool | isXGrp () const
Query others permissions.
bool | isROth () const
bool | isWOth () const
bool | isXOth () const
Query special permissions.
bool | isUid () const
| Set UID bit.
bool | isGid () const
| Set GID bit.
bool | isVtx () const
| Sticky bit.
Query permission
bool | isPerm (mode_t m) const
| Test for equal permission bits.
bool | hasPerm (mode_t m) const
| Test for set permission bits.

## Friends
std::ostream & | operator<< (std::ostream &str, const StatMode &obj)
| relates: StatMode Stream output.

## Extract permission bits only.
mode_t | _mode
mode_t | uperm () const
mode_t | gperm () const
mode_t | operm () const
mode_t | perm () const
mode_t | st_mode () const
| Return the mode_t value.

## Detailed Description

Wrapper class for mode_t values as derived from ::stat.

Note
  Mode restrictions usually do not apply to root (IamRoot).

Definition at line 85 of file PathInfo.h.

## Constructor & Destructor Documentation

## ◆ StatMode()

zypp::filesystem::StatMode::StatMode | ( | const mode_t & | mode_r = 0 | ) |
| inline

Ctor taking mode_t value from ::stat.

Definition at line 91 of file PathInfo.h.

## Member Function Documentation

## ◆ fileType()

FileType zypp::filesystem::StatMode::fileType | ( |  | ) | const

Definition at line 71 of file PathInfo.cc.

## ◆ isFile()

bool zypp::filesystem::StatMode::isFile | ( |  | ) | const
| inline

Definition at line 101 of file PathInfo.h.

## ◆ isDir()

bool zypp::filesystem::StatMode::isDir | ( |  | ) | const
| inline

Definition at line 102 of file PathInfo.h.

## ◆ isLink()

bool zypp::filesystem::StatMode::isLink | ( |  | ) | const
| inline

Definition at line 103 of file PathInfo.h.

## ◆ isChr()

bool zypp::filesystem::StatMode::isChr | ( |  | ) | const
| inline

Definition at line 104 of file PathInfo.h.

## ◆ isBlk()

bool zypp::filesystem::StatMode::isBlk | ( |  | ) | const
| inline

Definition at line 105 of file PathInfo.h.

## ◆ isFifo()

bool zypp::filesystem::StatMode::isFifo | ( |  | ) | const
| inline

Definition at line 106 of file PathInfo.h.

## ◆ isSock()

bool zypp::filesystem::StatMode::isSock | ( |  | ) | const
| inline

Definition at line 107 of file PathInfo.h.

## ◆ isRUsr()

bool zypp::filesystem::StatMode::isRUsr | ( |  | ) | const
| inline

Definition at line 112 of file PathInfo.h.

## ◆ isWUsr()

bool zypp::filesystem::StatMode::isWUsr | ( |  | ) | const
| inline

Definition at line 113 of file PathInfo.h.

## ◆ isXUsr()

bool zypp::filesystem::StatMode::isXUsr | ( |  | ) | const
| inline

Definition at line 114 of file PathInfo.h.

## ◆ isR()

bool zypp::filesystem::StatMode::isR | ( |  | ) | const
| inline

Short for isRUsr().

Definition at line 117 of file PathInfo.h.

## ◆ isW()

bool zypp::filesystem::StatMode::isW | ( |  | ) | const
| inline

Short for isWUsr().

Definition at line 119 of file PathInfo.h.

## ◆ isX()

bool zypp::filesystem::StatMode::isX | ( |  | ) | const
| inline

Short for isXUsr().

Definition at line 121 of file PathInfo.h.

## ◆ isRGrp()

bool zypp::filesystem::StatMode::isRGrp | ( |  | ) | const
| inline

Definition at line 126 of file PathInfo.h.

## ◆ isWGrp()

bool zypp::filesystem::StatMode::isWGrp | ( |  | ) | const
| inline

Definition at line 127 of file PathInfo.h.

## ◆ isXGrp()

bool zypp::filesystem::StatMode::isXGrp | ( |  | ) | const
| inline

Definition at line 128 of file PathInfo.h.

## ◆ isROth()

bool zypp::filesystem::StatMode::isROth | ( |  | ) | const
| inline

Definition at line 133 of file PathInfo.h.

## ◆ isWOth()

bool zypp::filesystem::StatMode::isWOth | ( |  | ) | const
| inline

Definition at line 134 of file PathInfo.h.

## ◆ isXOth()

bool zypp::filesystem::StatMode::isXOth | ( |  | ) | const
| inline

Definition at line 135 of file PathInfo.h.

## ◆ isUid()

bool zypp::filesystem::StatMode::isUid | ( |  | ) | const
| inline

Set UID bit.

Definition at line 141 of file PathInfo.h.

## ◆ isGid()

bool zypp::filesystem::StatMode::isGid | ( |  | ) | const
| inline

Set GID bit.

Definition at line 143 of file PathInfo.h.

## ◆ isVtx()

bool zypp::filesystem::StatMode::isVtx | ( |  | ) | const
| inline

Sticky bit.

Definition at line 145 of file PathInfo.h.

## ◆ isPerm()

bool zypp::filesystem::StatMode::isPerm | ( | mode_t | m | ) | const
| inline

Test for equal permission bits.

Definition at line 151 of file PathInfo.h.

## ◆ hasPerm()

bool zypp::filesystem::StatMode::hasPerm | ( | mode_t | m | ) | const
| inline

Test for set permission bits.

Definition at line 153 of file PathInfo.h.

## ◆ uperm()

mode_t zypp::filesystem::StatMode::uperm | ( |  | ) | const
| inline

Definition at line 158 of file PathInfo.h.

## ◆ gperm()

mode_t zypp::filesystem::StatMode::gperm | ( |  | ) | const
| inline

Definition at line 159 of file PathInfo.h.

## ◆ operm()

mode_t zypp::filesystem::StatMode::operm | ( |  | ) | const
| inline

Definition at line 160 of file PathInfo.h.

## ◆ perm()

mode_t zypp::filesystem::StatMode::perm | ( |  | ) | const
| inline

Definition at line 161 of file PathInfo.h.

## ◆ st_mode()

mode_t zypp::filesystem::StatMode::st_mode | ( |  | ) | const
| inline

Return the mode_t value.

Definition at line 165 of file PathInfo.h.

## Friends And Related Symbol Documentation

## ◆ operator<<

std::ostream & operator<< | ( | std::ostream & | str,
|  | const StatMode & | obj )
| friend

relates: StatMode Stream output.

Definition at line 96 of file PathInfo.cc.

## Member Data Documentation

## ◆ _mode

mode_t zypp::filesystem::StatMode::_mode
| private

Definition at line 168 of file PathInfo.h.

The documentation for this class was generated from the following files:

- zypp-core/fs/PathInfo.h
- zypp-core/fs/PathInfo.cc