14 namespace swissknife {
17 print_tree_(false), print_hash_(false), print_size_(false),
18 print_entries_(false) {}
24 'r',
"repository URL (absolute local path or remote URL)"));
45 const std::string &repo_url = *args.find(
'r')->second;
46 const std::string &repo_name =
47 (args.count(
'n') > 0) ? *args.find(
'n')->second :
"";
48 std::string repo_keys =
49 (args.count(
'k') > 0) ? *args.find(
'k')->second :
"";
52 const std::string &tmp_dir =
53 (args.count(
'l') > 0) ? *args.find(
'l')->second :
"/tmp";
54 if (args.count(
'h') > 0) {
61 const bool follow_redirects =
false;
62 const std::string proxy = ((args.count(
'@') > 0) ?
63 *args.find(
'@')->second :
"");
76 success =
Run(manual_root_hash, &fetcher);
79 success =
Run(manual_root_hash, &fetcher);
82 return (success) ? 0 : 1;
88 std::string tree_indent;
89 std::string hash_string;
91 std::string clg_entries;
95 for (
unsigned int i = 1; i < data.
tree_level; ++i) {
96 tree_indent +=
"\u2502 ";
100 tree_indent +=
"\u251C\u2500 ";
120 tree_indent.c_str(), hash_string.c_str(), clg_size.c_str(),
121 clg_entries.c_str(), path.c_str());
static Parameter Optional(const char key, const std::string &desc)
static Parameter Switch(const char key, const std::string &desc)
std::vector< Parameter > ParameterList
string JoinStrings(const vector< string > &strings, const string &joint)
std::string ToString(const bool with_suffix=false) const
bool Run(const shash::Any &manual_root_hash, ObjectFetcherT *object_fetcher)
bool IsHttpUrl(const std::string &path)
virtual ParameterList GetParams() const
uint64_t GetNumEntries() const
int Main(const ArgumentList &args)
static Parameter Mandatory(const char key, const std::string &desc)
const char kSuffixCatalog
const shash::Any catalog_hash
PathString mountpoint() const
string StringifyInt(const int64_t value)
bool DirectoryExists(const std::string &path)
std::string ToString() const
std::map< char, SharedPtr< std::string > > ArgumentList
void CatalogCallback(const CatalogTraversalData< catalog::Catalog > &data)
Any MkFromHexPtr(const HexPtr hex, const char suffix)
std::vector< std::string > FindFilesBySuffix(const std::string &dir, const std::string &suffix)
const unsigned int tree_level
CVMFS_EXPORT void LogCvmfs(const LogSource source, const int mask, const char *format,...)