libzypp 17.31.7
|
Wrapper class for ::stat/::lstat. More...
#include <fs/PathInfo.h>
Public Types | |
enum | Mode { STAT , LSTAT } |
stat() or lstat() More... | |
Public Member Functions | |
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) | |
~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... | |
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. More... | |
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] ) 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 |
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) |
Stream output. More... | |
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 220 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 246 of file PathInfo.h.
|
inline |
Return current Pathname as String.
Definition at line 248 of file PathInfo.h.
|
inline |
Return current Pathname as C-string.
Definition at line 250 of file PathInfo.h.
|
inline |
Return current stat Mode.
Definition at line 252 of file PathInfo.h.
|
inline |
Return error returned from last stat/lstat call.
Definition at line 254 of file PathInfo.h.
|
inline |
Set a new Pathname.
Definition at line 257 of file PathInfo.h.
|
inline |
Set a new Mode .
Definition at line 259 of file PathInfo.h.
STAT path.
Definition at line 262 of file PathInfo.h.
LSTAT path.
Definition at line 264 of file PathInfo.h.
Restat path using current mode.
Definition at line 266 of file PathInfo.h.
|
inline |
STAT current path.
Definition at line 269 of file PathInfo.h.
|
inline |
LSTAT current path.
Definition at line 271 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 281 of file PathInfo.h.
FileType zypp::filesystem::PathInfo::fileType | ( | ) | const |
Definition at line 212 of file PathInfo.cc.
|
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 294 of file PathInfo.h.
|
inline |
Definition at line 295 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 302 of file PathInfo.h.
|
inline |
Definition at line 303 of file PathInfo.h.
|
inline |
Definition at line 304 of file PathInfo.h.
|
inline |
Definition at line 306 of file PathInfo.h.
|
inline |
Definition at line 307 of file PathInfo.h.
|
inline |
Definition at line 308 of file PathInfo.h.
|
inline |
Definition at line 310 of file PathInfo.h.
|
inline |
Definition at line 311 of file PathInfo.h.
|
inline |
Definition at line 312 of file PathInfo.h.
|
inline |
Definition at line 314 of file PathInfo.h.
|
inline |
Definition at line 315 of file PathInfo.h.
|
inline |
Definition at line 316 of file PathInfo.h.
|
inline |
Definition at line 318 of file PathInfo.h.
|
inline |
Definition at line 319 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 323 of file PathInfo.h.
|
inline |
Definition at line 324 of file PathInfo.h.
|
inline |
Definition at line 326 of file PathInfo.h.
|
inline |
Return st_mode() as filesystem::StatMode.
Definition at line 330 of file PathInfo.h.
|
inline |
Definition at line 332 of file PathInfo.h.
|
inline |
Definition at line 336 of file PathInfo.h.
|
inline |
Definition at line 337 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 345 of file PathInfo.h.
|
inline |
Definition at line 346 of file PathInfo.h.
|
inline |
Definition at line 347 of file PathInfo.h.
|
inline |
Definition at line 349 of file PathInfo.h.
|
inline |
Definition at line 350 of file PathInfo.h.
|
inline |
Definition at line 351 of file PathInfo.h.
|
inline |
Definition at line 353 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 360 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 368 of file PathInfo.h.
|
inline |
Definition at line 369 of file PathInfo.h.
|
inline |
Definition at line 370 of file PathInfo.h.
|
inline |
Definition at line 375 of file PathInfo.h.
|
inline |
Definition at line 376 of file PathInfo.h.
|
inline |
Definition at line 377 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 381 of file PathInfo.h.
|
private |
Definition at line 382 of file PathInfo.h.
|
private |
Definition at line 383 of file PathInfo.h.
|
private |
Definition at line 384 of file PathInfo.h.