5 #ifndef CVMFS_SWISSKNIFE_CHECK_H_
6 #define CVMFS_SWISSKNIFE_CHECK_H_
17 class DownloadManager;
29 namespace swissknife {
35 virtual std::string
GetName()
const {
return "check"; }
37 return "CernVM File System repository sanity checker\n"
38 "This command checks the consistency of the file catalogs of a "
55 " lookups. Note that this is a fallback"
56 " option that may be removed."));
65 const uint64_t catalog_size,
66 const bool is_nested_catalog,
71 const uint64_t catalog_size = 0);
78 std::string
FetchPath(
const std::string &path);
85 std::set<PathString> *bind_mountpoints);
86 bool Exists(
const std::string &file);
91 const bool compare_names,
92 const bool is_transition_point =
false);
105 #endif // CVMFS_SWISSKNIFE_CHECK_H_
static Parameter Optional(const char key, const std::string &desc)
bool InspectHistory(history::History *history)
const manifest::Manifest * manifest() const
static Parameter Switch(const char key, const std::string &desc)
virtual ParameterList GetParams() const
std::vector< Parameter > ParameterList
const history::History * history() const
bool CompareEntries(const catalog::DirectoryEntry &a, const catalog::DirectoryEntry &b, const bool compare_names, const bool is_transition_point=false)
catalog::Catalog * FetchCatalog(const std::string &path, const shash::Any &catalog_hash, const uint64_t catalog_size=0)
bool InspectReflog(const shash::Any &reflog_hash, manifest::Manifest *manifest)
std::string temp_directory_
bool Find(const catalog::Catalog *catalog, const PathString &path, catalog::DeltaCounters *computed_counters, std::set< PathString > *bind_mountpoints)
std::string repo_base_path_
std::string DownloadPiece(const shash::Any catalog_hash)
int Main(const ArgumentList &args)
std::string DecompressPiece(const shash::Any catalog_hash)
bool Exists(const std::string &file)
static Parameter Mandatory(const char key, const std::string &desc)
std::string FetchPath(const std::string &path)
virtual std::string GetDescription() const
SmallHashDynamic< shash::Any, char > duplicates_map_
bool FindSubtreeRootCatalog(const std::string &subtree_path, shash::Any *root_hash, uint64_t *root_size)
bool CompareCounters(const catalog::Counters &a, const catalog::Counters &b)
std::map< char, SharedPtr< std::string > > ArgumentList
virtual std::string GetName() const
bool InspectTree(const std::string &path, const shash::Any &catalog_hash, const uint64_t catalog_size, const bool is_nested_catalog, const catalog::DirectoryEntry *transition_point, catalog::DeltaCounters *computed_counters)