libzypp
14.48.5
|
Wrapper class for ::stat/::lstat. More...
#include <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 |
unsigned int | major () const ZYPP_DEPRECATED |
unsigned int | minor () const ZYPP_DEPRECATED |
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 221 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 247 of file PathInfo.h.
|
inline |
Return current Pathname as String.
Definition at line 249 of file PathInfo.h.
|
inline |
Return current Pathname as C-string.
Definition at line 251 of file PathInfo.h.
|
inline |
Return current stat Mode.
Definition at line 253 of file PathInfo.h.
|
inline |
Return error returned from last stat/lstat call.
Definition at line 255 of file PathInfo.h.
|
inline |
Set a new Pathname.
Definition at line 258 of file PathInfo.h.
|
inline |
Set a new Mode .
Definition at line 260 of file PathInfo.h.
STAT path.
Definition at line 263 of file PathInfo.h.
LSTAT path.
Definition at line 265 of file PathInfo.h.
Restat path using current mode.
Definition at line 267 of file PathInfo.h.
|
inline |
STAT current path.
Definition at line 270 of file PathInfo.h.
|
inline |
LSTAT current path.
Definition at line 272 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 282 of file PathInfo.h.
FileType zypp::filesystem::PathInfo::fileType | ( | ) | const |
Definition at line 213 of file PathInfo.cc.
|
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 296 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 303 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 307 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 311 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 315 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 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 325 of file PathInfo.h.
|
inline |
Definition at line 327 of file PathInfo.h.
|
inline |
Return st_mode() as filesystem::StatMode.
Definition at line 331 of file PathInfo.h.
|
inline |
Definition at line 333 of file PathInfo.h.
|
inline |
Definition at line 337 of file PathInfo.h.
|
inline |
Definition at line 338 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 346 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 350 of file PathInfo.h.
|
inline |
Definition at line 351 of file PathInfo.h.
|
inline |
Definition at line 352 of file PathInfo.h.
|
inline |
Definition at line 354 of file PathInfo.h.
|
inline |
Definition at line 359 of file PathInfo.h.
|
inline |
Definition at line 360 of file PathInfo.h.
|
inline |
Definition at line 361 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.
unsigned int zypp::filesystem::PathInfo::major | ( | ) | const |
Definition at line 257 of file PathInfo.cc.
unsigned int zypp::filesystem::PathInfo::minor | ( | ) | const |
Definition at line 259 of file PathInfo.cc.
|
inline |
Definition at line 374 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 381 of file PathInfo.h.
|
inline |
Definition at line 382 of file PathInfo.h.
|
inline |
Definition at line 383 of file PathInfo.h.
|
friend |
Definition at line 267 of file PathInfo.cc.
|
related |
Stream output.
Definition at line 267 of file PathInfo.cc.
|
private |
Definition at line 387 of file PathInfo.h.
|
private |
Definition at line 388 of file PathInfo.h.
|
private |
Definition at line 389 of file PathInfo.h.
|
private |
Definition at line 390 of file PathInfo.h.