libzypp  15.28.6
zypp::RepoStatus Class Reference

Track changing files or directories. More...

#include <RepoStatus.h>

Classes

struct  Impl
 RepoStatus implementation. More...
 

Public Member Functions

 RepoStatus ()
 Default ctor. More...
 
 RepoStatus (const Pathname &path_r)
 Compute status for single file or directory (recursively) More...
 
 ~RepoStatus ()
 Dtor. More...
 
void saveToCookieFile (const Pathname &path_r) const
 Save the status information to a cookie file. More...
 
bool empty () const
 Whether the status is empty (default constucted) More...
 
Date timestamp () const
 The time the data were changed the last time. More...
 

Static Public Member Functions

static RepoStatus fromCookieFile (const Pathname &path)
 Reads the status from a cookie file. More...
 

Private Attributes

RWCOW_pointer< Impl_pimpl
 Implementation. More...
 

Friends

std::ostream & operator<< (std::ostream &str, const RepoStatus &obj)
 
RepoStatus operator&& (const RepoStatus &lhs, const RepoStatus &rhs)
 
bool operator== (const RepoStatus &lhs, const RepoStatus &rhs)
 

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &str, const RepoStatus &obj)
 
RepoStatus operator&& (const RepoStatus &lhs, const RepoStatus &rhs)
 
bool operator== (const RepoStatus &lhs, const RepoStatus &rhs)
 
bool operator!= (const RepoStatus &lhs, const RepoStatus &rhs)
 

Detailed Description

Track changing files or directories.

Compute timestamp and checksum for individual files or directories (recursively) to track changing content.

The timestamp most probably denotes the time the data were changed the last time, that's why it is exposed.

The checksum however is an implementation detail and of no use outside this class. operator== tells if the checksums of two rRepoStatus are the same.

Definition at line 38 of file RepoStatus.h.

Constructor & Destructor Documentation

zypp::RepoStatus::RepoStatus ( )

Default ctor.

Definition at line 74 of file RepoStatus.cc.

zypp::RepoStatus::RepoStatus ( const Pathname &  path_r)
explicit

Compute status for single file or directory (recursively)

Note
Construction from a non existing file will result in an empty status.

Definition at line 78 of file RepoStatus.cc.

zypp::RepoStatus::~RepoStatus ( )

Dtor.

Definition at line 105 of file RepoStatus.cc.

Member Function Documentation

RepoStatus zypp::RepoStatus::fromCookieFile ( const Pathname &  path)
static

Reads the status from a cookie file.

Returns
An empty RepoStatus if the file does not exist or is not readable.
See Also
saveToCookieFile

Definition at line 108 of file RepoStatus.cc.

void zypp::RepoStatus::saveToCookieFile ( const Pathname &  path_r) const

Save the status information to a cookie file.

Exceptions
Exceptionif the file can't be saved
See Also
fromCookieFile

Definition at line 126 of file RepoStatus.cc.

bool zypp::RepoStatus::empty ( ) const

Whether the status is empty (default constucted)

Definition at line 136 of file RepoStatus.cc.

Date zypp::RepoStatus::timestamp ( ) const

The time the data were changed the last time.

Definition at line 139 of file RepoStatus.cc.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  str,
const RepoStatus obj 
)
friend

Definition at line 142 of file RepoStatus.cc.

RepoStatus operator&& ( const RepoStatus lhs,
const RepoStatus rhs 
)
friend

Definition at line 145 of file RepoStatus.cc.

bool operator== ( const RepoStatus lhs,
const RepoStatus rhs 
)
friend

Definition at line 166 of file RepoStatus.cc.

std::ostream & operator<< ( std::ostream &  str,
const RepoStatus obj 
)
related

Stream output

Definition at line 142 of file RepoStatus.cc.

RepoStatus operator&& ( const RepoStatus lhs,
const RepoStatus rhs 
)
related

Combine two RepoStatus (combined checksum and newest timestamp)

Definition at line 145 of file RepoStatus.cc.

bool operator== ( const RepoStatus lhs,
const RepoStatus rhs 
)
related

Whether 2 RepoStatus refer to the same content checksum

Definition at line 166 of file RepoStatus.cc.

bool operator!= ( const RepoStatus lhs,
const RepoStatus rhs 
)
related

Whether 2 RepoStatus refer to different content checksums

Definition at line 96 of file RepoStatus.h.

Member Data Documentation

RWCOW_pointer<Impl> zypp::RepoStatus::_pimpl
private

Implementation.

Pointer to implementation

Definition at line 80 of file RepoStatus.h.


The documentation for this class was generated from the following files: