#include <PathInfo.h>
Public Types | |
| enum | Mode { STAT, LSTAT } |
| stat() or lstat() More... | |
Public Member Functions | |
| ~PathInfo () | |
| Dtor. | |
| const Pathname & | path () const |
| Return current Pathname. | |
| const std::string & | asString () const |
| Return current Pathname as 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. | |
| StatMode | asStatMode () const |
| Return st_mode() as filesystem::StatMode. | |
| nlink_t | nlink () const |
Construct from Pathname. | |
Default mode is STAT. | |
| 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. | |
| 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]). | |
| 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 | major () const |
| unsigned int | minor () 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 |
| stat | statbuf_C |
| Mode | mode_e |
| int | error_i |
Friends | |
| std::ostream & | operator<< (std::ostream &str, const PathInfo &obj) |
false or 0, if stat was not successful.For convenience PathInfo is available as zypp::PathInfo too.
Definition at line 218 of file PathInfo.h.
|
|
Definition at line 224 of file PathInfo.h. |
|
|
Definition at line 129 of file PathInfo.cc. |
|
||||||||||||
|
Definition at line 139 of file PathInfo.cc. References operator()(). |
|
||||||||||||
|
Definition at line 152 of file PathInfo.cc. References operator()(). |
|
||||||||||||
|
Definition at line 165 of file PathInfo.cc. References operator()(). |
|
|
Dtor.
Definition at line 178 of file PathInfo.cc. |
|
|
Return current Pathname.
Definition at line 244 of file PathInfo.h. References path_t. Referenced by zypp::target::rpm::librpmDb::DbDirInfo::DbDirInfo(), zypp::target::rpm::RpmDb::doRebuildDatabase(), zypp::target::rpm::librpmDb::DbDirInfo::illegalArgs(), lstat(), zypp::media::MediaCurl::MediaCurl(), operator()(), zypp::media::MediaHandler::releasePath(), setPath(), stat(), and zypp::target::rpm::librpmDb::DbDirInfo::usableArgs(). |
|
|
Return current Pathname as String.
Definition at line 246 of file PathInfo.h. References zypp::filesystem::Pathname::asString(), and path_t. Referenced by zypp::filesystem::operator<<(), and zypp::VendorAttr::VendorAttr(). |
|
|
Return current stat Mode.
Definition at line 248 of file PathInfo.h. References mode_e. |
|
|
Return error returned from last stat/lstat call.
Definition at line 250 of file PathInfo.h. References error_i. |
|
|
Set a new Pathname.
Definition at line 253 of file PathInfo.h. References error_i, path(), and path_t. Referenced by lstat(), operator()(), and stat(). |
|
|
Set a new Mode .
Definition at line 255 of file PathInfo.h. |
|
|
STAT path.
Definition at line 258 of file PathInfo.h. References operator()(), path(), setMode(), setPath(), and STAT. |
|
|
LSTAT path.
Definition at line 260 of file PathInfo.h. References LSTAT, operator()(), path(), setMode(), and setPath(). |
|
|
Restat path using current mode.
Definition at line 262 of file PathInfo.h. References operator()(), path(), and setPath(). |
|
|
STAT current path.
Definition at line 265 of file PathInfo.h. References operator()(), setMode(), and STAT. |
|
|
LSTAT current path.
Definition at line 267 of file PathInfo.h. References LSTAT, operator()(), and setMode(). |
|
|
Restat current path using current mode.
Definition at line 187 of file PathInfo.cc. References zypp::filesystem::Pathname::empty(), error_i, and path_t. Referenced by lstat(), operator()(), PathInfo(), and stat(). |
|
|
|
Definition at line 211 of file PathInfo.cc. References asStatMode(), zypp::filesystem::StatMode::fileType(), zypp::filesystem::FT_NOT_EXIST, and isExist(). |
|
|
|
|
Definition at line 287 of file PathInfo.h. |
|
|
Definition at line 288 of file PathInfo.h. |
|
|
Definition at line 289 of file PathInfo.h. References isExist(), and statbuf_C. Referenced by zypp::media::MediaDISK::attachTo(), zypp::media::MediaCD::forceEject(), major(), and minor(). |
|
|
Definition at line 290 of file PathInfo.h. |
|
|
Definition at line 291 of file PathInfo.h. |
|
|
Definition at line 294 of file PathInfo.h. References isExist(), and statbuf_C. Referenced by isR(). |
|
|
Definition at line 295 of file PathInfo.h. References isExist(), and statbuf_C. Referenced by isW(). |
|
|
Definition at line 296 of file PathInfo.h. References isExist(), and statbuf_C. Referenced by isX(). |
|
|
Definition at line 298 of file PathInfo.h. References isRUsr(). |
|
|
Definition at line 299 of file PathInfo.h. References isWUsr(). |
|
|
Definition at line 300 of file PathInfo.h. References isXUsr(). Referenced by zypp::applydeltarpm::haveApplydeltarpm(). |
|
|
Definition at line 302 of file PathInfo.h. |
|
|
Definition at line 303 of file PathInfo.h. |
|
|
Definition at line 304 of file PathInfo.h. |
|
|
Definition at line 306 of file PathInfo.h. |
|
|
Definition at line 307 of file PathInfo.h. |
|
|
Definition at line 308 of file PathInfo.h. |
|
|
Definition at line 310 of file PathInfo.h. |
|
|
Definition at line 311 of file PathInfo.h. |
|
|
Definition at line 312 of file PathInfo.h. |
|
|
Definition at line 314 of file PathInfo.h. |
|
|
Definition at line 315 of file PathInfo.h. |
|
|
Definition at line 317 of file PathInfo.h. References isExist(), and statbuf_C. Referenced by userMay(). |
|
|
Definition at line 318 of file PathInfo.h. References isExist(), and statbuf_C. Referenced by userMay(). |
|
|
Definition at line 319 of file PathInfo.h. References isExist(), and statbuf_C. Referenced by userMay(). |
|
|
Definition at line 320 of file PathInfo.h. |
|
|
Definition at line 322 of file PathInfo.h. References isExist(), and statbuf_C. Referenced by asStatMode(). |
|
|
Return st_mode() as filesystem::StatMode.
Definition at line 326 of file PathInfo.h. References st_mode(). Referenced by fileType(). |
|
|
Definition at line 328 of file PathInfo.h. |
|
|
Definition at line 332 of file PathInfo.h. References isExist(), and statbuf_C. Referenced by userMay(). |
|
|
Definition at line 333 of file PathInfo.h. References isExist(), and statbuf_C. Referenced by userMay(). |
|
|
Returns current users permission (
Definition at line 223 of file PathInfo.cc. References gperm(), group(), isExist(), operm(), owner(), and uperm(). Referenced by userMayR(), userMayRW(), userMayRWX(), userMayRX(), userMayW(), userMayWX(), and userMayX(). |
|
|
Definition at line 341 of file PathInfo.h. References userMay(). |
|
|
Definition at line 342 of file PathInfo.h. References userMay(). |
|
|
Definition at line 343 of file PathInfo.h. References userMay(). |
|
|
Definition at line 345 of file PathInfo.h. References userMay(). |
|
|
Definition at line 346 of file PathInfo.h. References userMay(). |
|
|
Definition at line 347 of file PathInfo.h. References userMay(). |
|
|
Definition at line 349 of file PathInfo.h. References userMay(). Referenced by zypp::media::MediaCurl::MediaCurl(). |
|
|
Definition at line 354 of file PathInfo.h. |
|
|
Definition at line 355 of file PathInfo.h. |
|
|
Definition at line 356 of file PathInfo.h. |
|
|
Definition at line 240 of file PathInfo.cc. References isBlk(), isChr(), and statbuf_C. Referenced by zypp::media::MediaDISK::attachTo(), and zypp::media::MediaCD::forceEject(). |
|
|
Definition at line 250 of file PathInfo.cc. References isBlk(), isChr(), and statbuf_C. Referenced by zypp::media::MediaDISK::attachTo(), and zypp::media::MediaCD::forceEject(). |
|
|
Definition at line 364 of file PathInfo.h. References isExist(), and statbuf_C. Referenced by zypp::target::rpm::RpmDb::doRebuildDatabase(), and zypp::PublicKey::Impl::readFromFile(). |
|
|
Definition at line 365 of file PathInfo.h. |
|
|
Definition at line 366 of file PathInfo.h. |
|
|
Definition at line 371 of file PathInfo.h. |
|
|
Definition at line 372 of file PathInfo.h. References isExist(), and statbuf_C. Referenced by zypp::storage::XMLFilesBackend::timestamp(), and zypp::target::rpm::RpmDb::timestamp(). |
|
|
Definition at line 373 of file PathInfo.h. |
|
||||||||||||
|
Stream output. Definition at line 260 of file PathInfo.cc. |
|
|
Definition at line 377 of file PathInfo.h. Referenced by asString(), operator()(), path(), and setPath(). |
|
|
Definition at line 378 of file PathInfo.h. Referenced by atime(), blksize(), blocks(), ctime(), dev(), gperm(), group(), ino(), isBlk(), isChr(), isDir(), isFifo(), isFile(), isGid(), isLink(), isRGrp(), isROth(), isRUsr(), isSock(), isUid(), isVtx(), isWGrp(), isWOth(), isWUsr(), isXGrp(), isXOth(), isXUsr(), major(), minor(), mtime(), nlink(), operm(), owner(), perm(), rdev(), size(), st_mode(), and uperm(). |
|
|
Definition at line 379 of file PathInfo.h. |
|
|
Definition at line 380 of file PathInfo.h. Referenced by error(), isExist(), operator()(), setMode(), and setPath(). |
1.4.6