bes  Updated for version 3.20.6
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 46 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 95 of file DirectoryUtil.cc.

Member Function Documentation

◆ 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 140 of file DirectoryUtil.cc.

◆ getModTimeAsString()

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

Get a human readable string for the modTime()

Definition at line 129 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 71 of file DirectoryUtil.h.

◆ path()

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

does not include trailing "/"

Definition at line 108 of file DirectoryUtil.cc.


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