|
libzypp 17.38.1
|
Wrapper class for ::stat/::lstat. More...
#include <zypp-core/fs/PathInfo.h>
Public Types | |
| enum | Mode { STAT , LSTAT } |
| stat() or lstat() More... | |
Public Member Functions | |
Construct from Pathname. | |
Default mode is | |
| PathInfo () | |
| PathInfo (Pathname path, Mode initial=STAT) | |
| PathInfo (const std::string &path, Mode initial=STAT) | |
| PathInfo (const char *path, Mode initial=STAT) | |
| ~PathInfo () | |
| Dtor. | |
| const Pathname & | path () const |
| Return current Pathname. | |
| const std::string & | asString () const |
| Return current Pathname as String. | |
| const char * | c_str () const |
| Return current Pathname as C-string. | |
| Mode | mode () const |
| Return current stat Mode. | |
| int | error () const |
| Return error returned from last stat/lstat call. | |
| void | setPath (const Pathname &path) |
| Set a new Pathname. | |
| void | setMode (Mode mode) |
| Set a new Mode . | |
| bool | stat (const Pathname &path) |
| STAT path. | |
| bool | lstat (const Pathname &path) |
| LSTAT path. | |
| bool | operator() (const Pathname &path) |
| Restat path using current mode. | |
| bool | stat () |
| STAT current path. | |
| bool | lstat () |
| LSTAT current path. | |
| bool | operator() () |
| Restat current path using current mode. | |
| bool | isExist () const |
| Return whether valid stat info exists. | |
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 |
| StatMode | asStatMode () const |
| Return st_mode() as filesystem::StatMode. | |
| nlink_t | nlink () 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]). | |
| 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 |
Friends | |
| std::ostream & | operator<< (std::ostream &str, const PathInfo &obj) |
Related Symbols | |
(Note that these are not member symbols.) | |
| std::ostream & | operator<< (std::ostream &str, const PathInfo &obj) ZYPP_API |
| Stream output. | |
Time stamps. | |
| Pathname | path_t |
| struct stat | statbuf_C |
| Mode | mode_e |
| int | error_i |
| time_t | atime () const |
| time_t | mtime () const |
| time_t | ctime () const |
Wrapper class for ::stat/::lstat.
false or 0, if stat was not successful.Definition at line 225 of file PathInfo.h.
| zypp::filesystem::PathInfo::PathInfo | ( | ) |
Definition at line 131 of file PathInfo.cc.
Definition at line 141 of file PathInfo.cc.
Definition at line 154 of file PathInfo.cc.
Definition at line 167 of file PathInfo.cc.
| zypp::filesystem::PathInfo::~PathInfo | ( | ) |
Dtor.
Definition at line 180 of file PathInfo.cc.
|
inline |
Return current Pathname.
Definition at line 251 of file PathInfo.h.
|
inline |
Return current Pathname as String.
Definition at line 253 of file PathInfo.h.
|
inline |
Return current Pathname as C-string.
Definition at line 255 of file PathInfo.h.
|
inline |
Return current stat Mode.
Definition at line 257 of file PathInfo.h.
|
inline |
Return error returned from last stat/lstat call.
Definition at line 259 of file PathInfo.h.
|
inline |
Set a new Pathname.
Definition at line 262 of file PathInfo.h.
|
inline |
Set a new Mode .
Definition at line 264 of file PathInfo.h.
|
inline |
STAT path.
Definition at line 267 of file PathInfo.h.
|
inline |
LSTAT path.
Definition at line 269 of file PathInfo.h.
|
inline |
Restat path using current mode.
Definition at line 271 of file PathInfo.h.
|
inline |
STAT current path.
Definition at line 274 of file PathInfo.h.
|
inline |
LSTAT current path.
Definition at line 276 of file PathInfo.h.
| bool zypp::filesystem::PathInfo::operator() | ( | ) |
Restat current path using current mode.
Definition at line 189 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 286 of file PathInfo.h.
| FileType zypp::filesystem::PathInfo::fileType | ( | ) | const |
Definition at line 213 of file PathInfo.cc.
|
inline |
Definition at line 295 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 299 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 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 318 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 |
Definition at line 325 of file PathInfo.h.
|
inline |
Definition at line 327 of file PathInfo.h.
|
inline |
Definition at line 328 of file PathInfo.h.
|
inline |
Definition at line 329 of file PathInfo.h.
|
inline |
Definition at line 330 of file PathInfo.h.
|
inline |
Definition at line 332 of file PathInfo.h.
|
inline |
Return st_mode() as filesystem::StatMode.
Definition at line 336 of file PathInfo.h.
|
inline |
Definition at line 338 of file PathInfo.h.
|
inline |
Definition at line 342 of file PathInfo.h.
|
inline |
Definition at line 343 of file PathInfo.h.
| mode_t zypp::filesystem::PathInfo::userMay | ( | ) | const |
Returns current users permission ([0-7]).
Definition at line 225 of file PathInfo.cc.
|
inline |
Definition at line 353 of file PathInfo.h.
|
inline |
Definition at line 354 of file PathInfo.h.
|
inline |
Definition at line 355 of file PathInfo.h.
|
inline |
Definition at line 357 of file PathInfo.h.
|
inline |
Definition at line 358 of file PathInfo.h.
|
inline |
Definition at line 359 of file PathInfo.h.
|
inline |
Definition at line 361 of file PathInfo.h.
|
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.
| unsigned int zypp::filesystem::PathInfo::devMajor | ( | ) | const |
Definition at line 242 of file PathInfo.cc.
| unsigned int zypp::filesystem::PathInfo::devMinor | ( | ) | const |
Definition at line 252 of file PathInfo.cc.
|
inline |
Definition at line 376 of file PathInfo.h.
|
inline |
Definition at line 377 of file PathInfo.h.
|
inline |
Definition at line 378 of file PathInfo.h.
|
inline |
Definition at line 383 of file PathInfo.h.
|
inline |
Definition at line 384 of file PathInfo.h.
|
inline |
Definition at line 385 of file PathInfo.h.
|
friend |
Definition at line 262 of file PathInfo.cc.
|
Stream output.
Definition at line 262 of file PathInfo.cc.
Definition at line 389 of file PathInfo.h.
|
private |
Definition at line 390 of file PathInfo.h.
Definition at line 391 of file PathInfo.h.
|
private |
Definition at line 392 of file PathInfo.h.