OPeNDAP Hyrax Back End Server (BES)  Updated for version 3.8.3
agg_util::FileInfo Class Reference

Class to hold info on files as we get them. More...

#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)
 strips any trailing "/" on path. More...
 
const std::string & 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. More...
 
std::string getModTimeAsString () const
 Get a human readable string for the modTime() More...
 
bool isDir () const
 
time_t modTime () const
 
bool operator< (const FileInfo &rhs) const
 Comparator using string::operator< on the getFullPath() result. More...
 
const std::string & path () const
 does not include trailing "/" More...
 
std::string toString () const
 
 ~FileInfo ()
 

Detailed Description

Class to hold info on files as we get them.

Definition at line 46 of file DirectoryUtil.h.

Constructor & Destructor Documentation

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

References agg_util::DirectoryUtil::removePrecedingSlashes(), and agg_util::DirectoryUtil::removeTrailingSlashes().

Here is the call graph for this function:

agg_util::FileInfo::~FileInfo ( )

Definition at line 111 of file DirectoryUtil.cc.

Member Function Documentation

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

Definition at line 122 of file DirectoryUtil.cc.

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

Referenced by agg_util::DirectoryUtil::getListingForPath(), operator<(), and toString().

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

Get a human readable string for the modTime()

Definition at line 140 of file DirectoryUtil.cc.

Referenced by toString().

bool agg_util::FileInfo::isDir ( ) const

Definition at line 128 of file DirectoryUtil.cc.

Referenced by toString().

time_t agg_util::FileInfo::modTime ( ) const

Definition at line 134 of file DirectoryUtil.cc.

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 72 of file DirectoryUtil.h.

References getFullPath().

Here is the call graph for this function:

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

does not include trailing "/"

Definition at line 116 of file DirectoryUtil.cc.

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

Definition at line 161 of file DirectoryUtil.cc.

References getFullPath(), getModTimeAsString(), and isDir().

Here is the call graph for this function:


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