1#ifndef __XRDPFC_DIRSTATE_HH__
2#define __XRDPFC_DIRSTATE_HH__
58 typedef std::map<std::string, DirState>
DsMap_t;
87 DirState **last_existing_dir =
nullptr);
99 DirState*
find_path(
const std::string &path,
int max_depth,
bool parse_as_lfn,
bool create_subdirs,
100 DirState **last_existing_dir =
nullptr);
123 for (
DirState *p = node; p != last_existing; )
126 p->m_here_stats.m_NDirectoriesCreated += 1;
136 if ( ! existing_file)
std::function< int(const std::string &)> unlink_func
void note_created_dirs(DirState *node, DirState *last_existing)
Count the DirState nodes a lookup created, from node up to last_existing.
void note_file_open(DirState *node, DirState *last_existing, bool existing_file)
std::vector< DirState * > m_reap_candidates
long long m_st_blocks_fuzz
time_t m_stats_reset_time
void dump_recursively(int max_depth) const
void init_stat_reset_times(time_t t)
DirState * find_dirstate_for_lfn(const std::string &lfn, DirState **last_existing_dir=nullptr)
time_t m_sshot_stats_reset_time
void update_stats_and_usages(time_t last_update, bool collect_reap_candidates)
long long reap_empty_leaf_dirs(unlink_func unlink_foo)
void reset_sshot_stats(time_t last_update)
DirUsage m_recursive_subdir_usage
std::map< std::string, DirState > DsMap_t
DsMap_t::iterator DsMap_i
int count_dirs_to_level(int max_depth) const
DirState * create_child(const std::string &dir)
DirStats m_recursive_subdir_stats
DirState * find_dir(const std::string &dir, bool create_subdirs)
long long m_RecursiveStBlocksFuzz
sum over the subdirs, set by propagation
int generate_dir_path(std::string &result)
DirState * find_path_tok(PathTokenizer &pt, int pos, bool create_subdirs, DirState **last_existing_dir=nullptr)
DirState * find_path(const std::string &path, int max_depth, bool parse_as_lfn, bool create_subdirs, DirState **last_existing_dir=nullptr)
void update_stats_and_usages(std::vector< DirState * > *reap_candidates=nullptr)
void dump_recursively(const char *name, int max_depth) const
void upward_propagate_initial_scan_usages()
bool is_empty_leaf() const