bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
agg_util::FileInfo Class Reference

#include <DirectoryUtil.h>

Collaboration diagram for agg_util::FileInfo:
Collaboration graph

Public Member Functions

const std::string & basename () const
 
 FileInfo (const std::string &path, const std::string &basename, bool isDir, time_t modTime)
 
const std::string & getFullPath () const
 
std::string getModTimeAsString () const
 
bool isDir () const
 
time_t modTime () const
 
bool operator< (const FileInfo &rhs) const
 
const std::string & path () const
 
std::string toString () const
 

Detailed Description

Class to hold info on files as we get them.

Definition at line 42 of file DirectoryUtil.h.

Constructor & Destructor Documentation

◆ FileInfo()

agg_util::FileInfo::FileInfo ( const std::string & path,
const std::string & basename,
bool isDir,
time_t modTime )

strips any trailing "/" on path. path.empty() assumed root "/"

Definition at line 94 of file DirectoryUtil.cc.

◆ ~FileInfo()

agg_util::FileInfo::~FileInfo ( )

Definition at line 102 of file DirectoryUtil.cc.

Member Function Documentation

◆ basename()

const std::string & agg_util::FileInfo::basename ( ) const

Definition at line 113 of file DirectoryUtil.cc.

◆ getFullPath()

const std::string & agg_util::FileInfo::getFullPath ( ) const

Get the path and basename as path + "/" + basename We cache this after first call to allow for a const reference return and optimize qsort on this since it will be called a lot.

Definition at line 139 of file DirectoryUtil.cc.

◆ getModTimeAsString()

std::string agg_util::FileInfo::getModTimeAsString ( ) const

Get a human readable string for the modTime()

Definition at line 128 of file DirectoryUtil.cc.

◆ isDir()

bool agg_util::FileInfo::isDir ( ) const

Definition at line 118 of file DirectoryUtil.cc.

◆ modTime()

time_t agg_util::FileInfo::modTime ( ) const

Definition at line 123 of file DirectoryUtil.cc.

◆ operator<()

bool agg_util::FileInfo::operator< ( const FileInfo & rhs) const
inline

Comparator using string::operator< on the getFullPath() result. Inlined since used for sort.

Definition at line 67 of file DirectoryUtil.h.

◆ path()

const std::string & agg_util::FileInfo::path ( ) const

does not include trailing "/"

Definition at line 107 of file DirectoryUtil.cc.

◆ toString()

std::string agg_util::FileInfo::toString ( ) const

Definition at line 147 of file DirectoryUtil.cc.


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