ewmscp
..
|
generic stat abstraction class Used to abstract the variants of the stat structure. More...
#include <genericStat.h>
Public Types | |
typedef std::chrono::system_clock | clock_type |
Public Member Functions | |
genericStat (const struct stat &statBuf, const clock_type::duration &aTimeResolution) | |
genericStat (const struct stat64 &statBuf, const clock_type::duration &aTimeResolution) | |
genericStat () | |
void | getAtime (struct timespec &spec) const |
void | getMtime (struct timespec &spec) const |
void | getAtime (struct timeval &spec) const |
void | getMtime (struct timeval &spec) const |
void | getAtime (std::string &spec) const |
void | getMtime (std::string &spec) const |
clock_type::time_point | getMtime () const |
bool | isNewerThan (const genericStat &that) const |
bool | isSameMtimeAs (const genericStat &that) const |
bool | isDir () const |
bool | isLink () const |
bool | isRegularFile () const |
Public Attributes | |
dev_t | device |
size_t | size |
size_t | sizeOnDisk |
size_t | blksize |
clock_type::time_point | aTime |
clock_type::time_point | mTime |
clock_type::duration | timeResolution |
mode_t | mode |
uid_t | ownerUid |
gid_t | ownerGid |
Static Private Member Functions | |
static void | chronoToTimespec (struct timespec &spec, const clock_type::time_point &Chrono) |
static void | chronoToTimeval (struct timeval &spec, const clock_type::time_point &Chrono) |
static void | chronoToString (std::string &str, const clock_type::time_point &Chrono) |
generic stat abstraction class Used to abstract the variants of the stat structure.
Provides comparison functions, that in the case of the time comparisons consider the time resolution of the underlying stat.
Definition at line 12 of file genericStat.h.
typedef std::chrono::system_clock genericStat::clock_type |
Definition at line 14 of file genericStat.h.
genericStat::genericStat | ( | const struct stat & | statBuf, |
const clock_type::duration & | aTimeResolution | ||
) |
Definition at line 10 of file genericStat.cpp.
genericStat::genericStat | ( | const struct stat64 & | statBuf, |
const clock_type::duration & | aTimeResolution | ||
) |
Definition at line 24 of file genericStat.cpp.
|
default |
|
staticprivate |
Definition at line 47 of file genericStat.cpp.
Referenced by getAtime(), and getMtime().
|
staticprivate |
Definition at line 39 of file genericStat.cpp.
Referenced by getAtime(), and getMtime().
|
staticprivate |
Definition at line 43 of file genericStat.cpp.
Referenced by getAtime(), and getMtime().
void genericStat::getAtime | ( | std::string & | spec | ) | const |
Definition at line 74 of file genericStat.cpp.
References aTime, and chronoToString().
void genericStat::getAtime | ( | struct timespec & | spec | ) | const |
Definition at line 62 of file genericStat.cpp.
References aTime, and chronoToTimespec().
Referenced by outputHandler::libssh::writerLibssh::doAttributePreservations(), outputHandler::posixFile::writerPosixFile::doAttributePreservations(), and outputHandler::daosFs::writerDaosFs::doAttributePreservations().
void genericStat::getAtime | ( | struct timeval & | spec | ) | const |
Definition at line 68 of file genericStat.cpp.
References aTime, and chronoToTimeval().
genericStat::clock_type::time_point genericStat::getMtime | ( | ) | const |
void genericStat::getMtime | ( | std::string & | spec | ) | const |
Definition at line 77 of file genericStat.cpp.
References chronoToString(), and mTime.
void genericStat::getMtime | ( | struct timespec & | spec | ) | const |
Definition at line 65 of file genericStat.cpp.
References chronoToTimespec(), and mTime.
Referenced by inputHandler::dcap::readerDcap::checkUnchangedness(), inputHandler::daosFs::readerDaosFs::checkUnchangedness(), inputHandler::libssh::readerLibssh::checkUnchangedness(), inputHandler::posixFile::readerPosixFile::checkUnchangedness(), outputHandler::libssh::writerLibssh::doAttributePreservations(), outputHandler::posixFile::writerPosixFile::doAttributePreservations(), outputHandler::daosFs::writerDaosFs::doAttributePreservations(), outputHandler::dcap::doAttributePreservations(), outputHandler::posixFile::doAttributePreservations(), outputHandler::daosFs::doAttributePreservations(), outputHandler::libssh::rename(), outputHandler::posixFile::rename(), and outputHandler::daosFs::rename().
void genericStat::getMtime | ( | struct timeval & | spec | ) | const |
Definition at line 71 of file genericStat.cpp.
References chronoToTimeval(), and mTime.
bool genericStat::isDir | ( | ) | const |
Definition at line 92 of file genericStat.cpp.
References mode.
Referenced by outputHandler::dcap::rename(), outputHandler::Gpfs::rename(), outputHandler::libssh::rename(), outputHandler::posixFile::rename(), and outputHandler::daosFs::rename().
bool genericStat::isLink | ( | ) | const |
bool genericStat::isNewerThan | ( | const genericStat & | that | ) | const |
Definition at line 84 of file genericStat.cpp.
References mTime, and timeResolution.
bool genericStat::isRegularFile | ( | ) | const |
Definition at line 98 of file genericStat.cpp.
References mode.
bool genericStat::isSameMtimeAs | ( | const genericStat & | that | ) | const |
Definition at line 87 of file genericStat.cpp.
References mTime, and timeResolution.
Referenced by inputHandler::dcap::readerDcap::checkUnchangedness(), inputHandler::daosFs::readerDaosFs::checkUnchangedness(), inputHandler::libssh::readerLibssh::checkUnchangedness(), inputHandler::posixFile::readerPosixFile::checkUnchangedness(), outputHandler::dcap::rename(), outputHandler::libssh::rename(), outputHandler::posixFile::rename(), and outputHandler::daosFs::rename().
clock_type::time_point genericStat::aTime |
Definition at line 19 of file genericStat.h.
Referenced by genericSftpStat::genericSftpStat(), and getAtime().
size_t genericStat::blksize |
Definition at line 18 of file genericStat.h.
Referenced by genericSftpStat::genericSftpStat(), operator<<(), and inputHandler::posixFile::readerPosixFile::readerPosixFile().
dev_t genericStat::device |
Definition at line 15 of file genericStat.h.
Referenced by moveRequestProvider::addDirContent(), cmdLineRequestProvider::addDirContent(), genericSftpStat::genericSftpStat(), inputHandler::dummy::getStat(), and operator<<().
mode_t genericStat::mode |
Definition at line 22 of file genericStat.h.
Referenced by outputHandler::libssh::writerLibssh::doAttributePreservations(), outputHandler::posixFile::writerPosixFile::doAttributePreservations(), outputHandler::daosFs::writerDaosFs::doAttributePreservations(), outputHandler::dcap::doAttributePreservations(), outputHandler::posixFile::doAttributePreservations(), outputHandler::daosFs::doAttributePreservations(), genericSftpStat::genericSftpStat(), isDir(), isLink(), isRegularFile(), operator<<(), and inputHandler::posixFile::readerPosixFile::readerPosixFile().
clock_type::time_point genericStat::mTime |
Definition at line 20 of file genericStat.h.
Referenced by copyRequest::listingRequest::compare(), genericSftpStat::genericSftpStat(), getMtime(), isNewerThan(), and isSameMtimeAs().
gid_t genericStat::ownerGid |
Definition at line 24 of file genericStat.h.
Referenced by outputHandler::libssh::writerLibssh::doAttributePreservations(), outputHandler::posixFile::writerPosixFile::doAttributePreservations(), outputHandler::daosFs::writerDaosFs::doAttributePreservations(), outputHandler::dcap::doAttributePreservations(), outputHandler::posixFile::doAttributePreservations(), outputHandler::daosFs::doAttributePreservations(), genericSftpStat::genericSftpStat(), and operator<<().
uid_t genericStat::ownerUid |
Definition at line 23 of file genericStat.h.
Referenced by outputHandler::libssh::writerLibssh::doAttributePreservations(), outputHandler::posixFile::writerPosixFile::doAttributePreservations(), outputHandler::daosFs::writerDaosFs::doAttributePreservations(), outputHandler::dcap::doAttributePreservations(), outputHandler::posixFile::doAttributePreservations(), outputHandler::daosFs::doAttributePreservations(), genericSftpStat::genericSftpStat(), and operator<<().
size_t genericStat::size |
Definition at line 16 of file genericStat.h.
Referenced by inputHandler::dcap::readerDcap::checkUnchangedness(), inputHandler::libssh::readerLibssh::checkUnchangedness(), inputHandler::daosFs::readerDaosFs::checkUnchangedness(), inputHandler::posixFile::readerPosixFile::checkUnchangedness(), copyRequest::listingRequest::compare(), genericSftpStat::genericSftpStat(), operator<<(), inputHandler::Gpfs::readerGpfs::readerGpfs(), outputHandler::dcap::rename(), outputHandler::libssh::rename(), outputHandler::posixFile::rename(), and outputHandler::daosFs::rename().
size_t genericStat::sizeOnDisk |
Definition at line 17 of file genericStat.h.
Referenced by genericSftpStat::genericSftpStat(), and operator<<().
clock_type::duration genericStat::timeResolution |
Definition at line 21 of file genericStat.h.
Referenced by genericSftpStat::genericSftpStat(), isNewerThan(), and isSameMtimeAs().