libzypp
17.28.5
|
Wrapper class for ::stat/::lstat. More...
#include <fs/PathInfo.h>
Public Types | |
enum | Mode { STAT, LSTAT } |
stat() or lstat() More... | |
Public Member Functions | |
~PathInfo () | |
Dtor. More... | |
const Pathname & | path () const |
Return current Pathname. More... | |
const std::string & | asString () const |
Return current Pathname as String. More... | |
const char * | c_str () const |
Return current Pathname as C-string. More... | |
Mode | mode () const |
Return current stat Mode. More... | |
int | error () const |
Return error returned from last stat/lstat call. More... | |
void | setPath (const Pathname &path) |
Set a new Pathname. More... | |
void | setMode (Mode mode) |
Set a new Mode . More... | |
bool | stat (const Pathname &path) |
STAT path. More... | |
bool | lstat (const Pathname &path) |
LSTAT path. More... | |
bool | operator() (const Pathname &path) |
Restat path using current mode. More... | |
bool | stat () |
STAT current path. More... | |
bool | lstat () |
LSTAT current path. More... | |
bool | operator() () |
Restat current path using current mode. More... | |
bool | isExist () const |
Return whether valid stat info exists. More... | |
StatMode | asStatMode () const |
Return st_mode() as filesystem::StatMode. More... | |
nlink_t | nlink () const |
Construct from Pathname. | |
Default mode is | |
PathInfo () | |
PathInfo (const Pathname &path, Mode initial=STAT) | |
PathInfo (const std::string &path, Mode initial=STAT) | |
PathInfo (const char *path, Mode initial=STAT) | |
Query StatMode attibutes. | |
Combines zypp::PathInfo::isExist and zypp::filesystem::StatMode query. | |
FileType | fileType () const |
bool | isFile () const |
bool | isDir () const |
bool | isLink () const |
bool | isChr () const |
bool | isBlk () const |
bool | isFifo () const |
bool | isSock () const |
bool | isRUsr () const |
bool | isWUsr () const |
bool | isXUsr () const |
bool | isR () const |
bool | isW () const |
bool | isX () const |
bool | isRGrp () const |
bool | isWGrp () const |
bool | isXGrp () const |
bool | isROth () const |
bool | isWOth () const |
bool | isXOth () const |
bool | isUid () const |
bool | isGid () const |
bool | isVtx () const |
bool | isPerm (mode_t m) const |
bool | hasPerm (mode_t m) const |
mode_t | uperm () const |
mode_t | gperm () const |
mode_t | operm () const |
mode_t | perm () const |
mode_t | st_mode () const |
Owner and group | |
uid_t | owner () const |
gid_t | group () const |
Permission according to current uid/gid. | |
mode_t | userMay () const |
Returns current users permission ([0-7] ) More... | |
bool | userMayR () const |
bool | userMayW () const |
bool | userMayX () const |
bool | userMayRW () const |
bool | userMayRX () const |
bool | userMayWX () const |
bool | userMayRWX () const |
Device and inode info. | |
ino_t | ino () const |
dev_t | dev () const |
dev_t | rdev () const |
unsigned int | devMajor () const |
unsigned int | devMinor () const |
Size info. | |
off_t | size () const |
unsigned long | blksize () const |
unsigned long | blocks () const |
Time stamps. | |
time_t | atime () const |
time_t | mtime () const |
time_t | ctime () const |
Private Attributes | |
Pathname | path_t |
struct stat | statbuf_C |
Mode | mode_e |
int | error_i |
Friends | |
std::ostream & | operator<< (std::ostream &str, const PathInfo &obj) |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &str, const PathInfo &obj) |
Wrapper class for ::stat/::lstat.
false
or 0
, if stat was not successful.Definition at line 218 of file PathInfo.h.
zypp::filesystem::PathInfo::PathInfo | ( | ) |
Definition at line 130 of file PathInfo.cc.
Definition at line 140 of file PathInfo.cc.
Definition at line 153 of file PathInfo.cc.
Definition at line 166 of file PathInfo.cc.
zypp::filesystem::PathInfo::~PathInfo | ( | ) |
Dtor.
Definition at line 179 of file PathInfo.cc.
|
inline |
Return current Pathname.
Definition at line 244 of file PathInfo.h.
|
inline |
Return current Pathname as String.
Definition at line 246 of file PathInfo.h.
|
inline |
Return current Pathname as C-string.
Definition at line 248 of file PathInfo.h.
|
inline |
Return current stat Mode.
Definition at line 250 of file PathInfo.h.
|
inline |
Return error returned from last stat/lstat call.
Definition at line 252 of file PathInfo.h.
|
inline |
Set a new Pathname.
Definition at line 255 of file PathInfo.h.
|
inline |
Set a new Mode .
Definition at line 257 of file PathInfo.h.
STAT path.
Definition at line 260 of file PathInfo.h.
LSTAT path.
Definition at line 262 of file PathInfo.h.
Restat path using current mode.
Definition at line 264 of file PathInfo.h.
|
inline |
STAT current path.
Definition at line 267 of file PathInfo.h.
|
inline |
LSTAT current path.
Definition at line 269 of file PathInfo.h.
bool zypp::filesystem::PathInfo::operator() | ( | ) |
Restat current path using current mode.
Definition at line 188 of file PathInfo.cc.
|
inline |
Return whether valid stat info exists.
That's usg. whether the file exist and you had permission to stat it.
Definition at line 279 of file PathInfo.h.
FileType zypp::filesystem::PathInfo::fileType | ( | ) | const |
Definition at line 212 of file PathInfo.cc.
|
inline |
Definition at line 287 of file PathInfo.h.
|
inline |
Definition at line 288 of file PathInfo.h.
|
inline |
Definition at line 289 of file PathInfo.h.
|
inline |
Definition at line 290 of file PathInfo.h.
|
inline |
Definition at line 291 of file PathInfo.h.
|
inline |
Definition at line 292 of file PathInfo.h.
|
inline |
Definition at line 293 of file PathInfo.h.
|
inline |
Definition at line 296 of file PathInfo.h.
|
inline |
Definition at line 297 of file PathInfo.h.
|
inline |
Definition at line 298 of file PathInfo.h.
|
inline |
Definition at line 300 of file PathInfo.h.
|
inline |
Definition at line 301 of file PathInfo.h.
|
inline |
Definition at line 302 of file PathInfo.h.
|
inline |
Definition at line 304 of file PathInfo.h.
|
inline |
Definition at line 305 of file PathInfo.h.
|
inline |
Definition at line 306 of file PathInfo.h.
|
inline |
Definition at line 308 of file PathInfo.h.
|
inline |
Definition at line 309 of file PathInfo.h.
|
inline |
Definition at line 310 of file PathInfo.h.
|
inline |
Definition at line 312 of file PathInfo.h.
|
inline |
Definition at line 313 of file PathInfo.h.
|
inline |
Definition at line 314 of file PathInfo.h.
|
inline |
Definition at line 316 of file PathInfo.h.
|
inline |
Definition at line 317 of file PathInfo.h.
|
inline |
Definition at line 319 of file PathInfo.h.
|
inline |
Definition at line 320 of file PathInfo.h.
|
inline |
Definition at line 321 of file PathInfo.h.
|
inline |
Definition at line 322 of file PathInfo.h.
|
inline |
Definition at line 324 of file PathInfo.h.
|
inline |
Return st_mode() as filesystem::StatMode.
Definition at line 328 of file PathInfo.h.
|
inline |
Definition at line 330 of file PathInfo.h.
|
inline |
Definition at line 334 of file PathInfo.h.
|
inline |
Definition at line 335 of file PathInfo.h.
mode_t zypp::filesystem::PathInfo::userMay | ( | ) | const |
Returns current users permission ([0-7]
)
Definition at line 224 of file PathInfo.cc.
|
inline |
Definition at line 343 of file PathInfo.h.
|
inline |
Definition at line 344 of file PathInfo.h.
|
inline |
Definition at line 345 of file PathInfo.h.
|
inline |
Definition at line 347 of file PathInfo.h.
|
inline |
Definition at line 348 of file PathInfo.h.
|
inline |
Definition at line 349 of file PathInfo.h.
|
inline |
Definition at line 351 of file PathInfo.h.
|
inline |
Definition at line 356 of file PathInfo.h.
|
inline |
Definition at line 357 of file PathInfo.h.
|
inline |
Definition at line 358 of file PathInfo.h.
unsigned int zypp::filesystem::PathInfo::devMajor | ( | ) | const |
Definition at line 241 of file PathInfo.cc.
unsigned int zypp::filesystem::PathInfo::devMinor | ( | ) | const |
Definition at line 251 of file PathInfo.cc.
|
inline |
Definition at line 366 of file PathInfo.h.
|
inline |
Definition at line 367 of file PathInfo.h.
|
inline |
Definition at line 368 of file PathInfo.h.
|
inline |
Definition at line 373 of file PathInfo.h.
|
inline |
Definition at line 374 of file PathInfo.h.
|
inline |
Definition at line 375 of file PathInfo.h.
|
friend |
Definition at line 261 of file PathInfo.cc.
|
related |
Stream output.
Definition at line 261 of file PathInfo.cc.
|
private |
Definition at line 379 of file PathInfo.h.
|
private |
Definition at line 380 of file PathInfo.h.
|
private |
Definition at line 381 of file PathInfo.h.
|
private |
Definition at line 382 of file PathInfo.h.