29#ifndef __AGG_UTIL__DIRECTORY_UTIL_H__
30#define __AGG_UTIL__DIRECTORY_UTIL_H__
45 FileInfo(
const std::string&
path,
const std::string& basename,
bool isDir, time_t modTime);
49 const std::string&
path()
const;
50 const std::string& basename()
const;
52 time_t modTime()
const;
63 std::string toString()
const;
74 std::string _basename;
75 mutable std::string _fullPath;
97 void setRootDir(
const std::string& rootDir,
bool allowRelativePaths =
false,
bool allowSymLinks =
false);
149 void getListingForPath(
const std::string& path, std::vector<FileInfo>* pRegularFiles,
150 std::vector<FileInfo>* pDirectories);
162 std::vector<FileInfo>* pDirectories);
181 static void printFileInfoList(std::ostream& os,
const std::vector<FileInfo>& listing);
196 static bool matchesSuffix(
const std::string& filename,
const std::string& suffix);
204 void throwErrorForOpendirFail(
const std::string& fullPath);
212 bool matchesAllFilters(
const std::string& path, time_t modTime)
const;
218 std::string _rootDir;
228 bool _filteringModTimes;
232 time_t _newestModTime;
235 static const std::string _sDebugChannel;
Regular expression matching.
static std::string getBESRootDir()
void setFilterRegExp(const std::string ®exp)
static void removePrecedingSlashes(std::string &path)
static bool hasRelativePath(const std::string &path)
static void printFileInfoList(std::ostream &os, const std::vector< FileInfo > &listing)
void setRootDir(const std::string &rootDir, bool allowRelativePaths=false, bool allowSymLinks=false)
void getListingOfRegularFilesRecursive(const std::string &path, std::vector< FileInfo > &rRegularFiles)
void setFilterSuffix(const std::string &suffix)
static void removeTrailingSlashes(std::string &path)
void getListingForPath(const std::string &path, std::vector< FileInfo > *pRegularFiles, std::vector< FileInfo > *pDirectories)
void getListingForPathRecursive(const std::string &path, std::vector< FileInfo > *pRegularFiles, std::vector< FileInfo > *pDirectories)
void setFilterModTimeOlderThan(time_t newestModTime)
const std::string & getRootDir() const
bool operator<(const FileInfo &rhs) const
std::string getModTimeAsString() const
FileInfo(const std::string &path, const std::string &basename, bool isDir, time_t modTime)
const std::string & path() const
const std::string & getFullPath() const
Helper class for temporarily hijacking an existing dhi to load a DDX response for one particular file...