33#ifndef S_BESCatalogUtils_h
34#define S_BESCatalogUtils_h 1
61class BESCatalogUtils:
public BESObj {
64 static std::map<std::string, BESCatalogUtils *> _instances;
68 std::string d_root_dir;
69 std::list<std::string> d_exclude;
70 std::list<std::string> d_include;
75 struct handler_regex {
80 std::vector<handler_regex> d_match_list;
82 typedef std::vector<handler_regex>::const_iterator match_citer;
83 BESCatalogUtils::match_citer match_list_begin()
const;
84 BESCatalogUtils::match_citer match_list_end()
const;
86 BESCatalogUtils():d_follow_syms(
false) {}
88 static void bes_add_stat_info(
BESCatalogEntry *entry,
struct stat &buf);
91 BESCatalogUtils(
const std::string &name,
bool strict =
true);
93 virtual ~BESCatalogUtils()
107 bool follow_sym_links()
const
109 return d_follow_syms;
112 virtual bool include(
const std::string &inQuestion)
const;
113 virtual bool exclude(
const std::string &inQuestion)
const;
116 bool is_data(
const std::string &item)
const;
120 virtual unsigned int get_entries(DIR *dip,
const std::string &fullnode,
const std::string &use_node,
121 BESCatalogEntry *entry,
bool dirs_only);
123 static void display_entry(BESCatalogEntry *entry, BESInfo *info);
125 static void bes_add_stat_info(BESCatalogEntry *entry,
const std::string &fullnode);
127 static bool isData(
const std::string &inQuestion,
const std::string &catalog, std::list<std::string> &services);
130 virtual void dump(std::ostream &strm)
const;
133 static BESCatalogUtils * Utils(
const std::string &name);
139 static void delete_all_catalogs();
const std::string & get_root_dir() const
Get the root directory of the catalog.
virtual bool exclude(const std::string &inQuestion) const
Should this file/directory be excluded in the catalog?
virtual unsigned int get_entries(DIR *dip, const std::string &fullnode, const std::string &use_node, BESCatalogEntry *entry, bool dirs_only)
virtual bool include(const std::string &inQuestion) const
Should this file/directory be included in the catalog?
std::string get_handler_name(const std::string &item) const
Find the handler name that will process.
bool is_data(const std::string &item) const
is there a handler that can process this
virtual void dump(std::ostream &strm) const
dump the contents of this object to the specified ostream
informational response object
top level BES object to house generic methods