5 #ifndef CVMFS_SWISSKNIFE_SCRUB_H_
6 #define CVMFS_SWISSKNIFE_SCRUB_H_
15 namespace swissknife {
21 virtual std::string
GetName()
const {
return "scrub"; }
23 return "CernVM File System repository file storage checker. Finds silent "
24 "disk corruptions by recomputing all file content checksums in the "
25 "backend file storage.";
48 const std::string &file_name);
50 const std::string &dir_name);
52 const std::string &symlink_name);
57 const std::string &path,
58 const std::string &affected_hash =
"")
const;
63 const std::string &file_name,
64 const std::string &full_path)
const;
66 const std::string &full_path)
const;
68 std::string
MakeFullPath(
const std::string &relative_path,
69 const std::string &file_name)
const;
82 #endif // CVMFS_SWISSKNIFE_SCRUB_H_
void FileCallback(const std::string &relative_path, const std::string &file_name)
void DirCallback(const std::string &relative_path, const std::string &dir_name)
virtual std::string GetName() const
std::vector< Parameter > ParameterList
virtual ParameterList GetParams() const
void OnFileHashed(const ScrubbingResult &scrubbing_result)
bool CheckHashString(const std::string &hash_string, const std::string &full_path) const
void SymlinkCallback(const std::string &relative_path, const std::string &symlink_name)
std::string MakeFullPath(const std::string &relative_path, const std::string &file_name) const
void PrintAlert(const Alerts::Type type, const std::string &path, const std::string &affected_hash="") const
std::string MakeRelativePath(const std::string &full_path)
ScrubbingPipeline pipeline_scrubbing_
virtual std::string GetDescription() const
pthread_mutex_t alerts_mutex_
std::string CheckPathAndExtractHash(const std::string &relative_path, const std::string &file_name, const std::string &full_path) const
std::map< char, SharedPtr< std::string > > ArgumentList
static const char * ToString(const Type t)
int Main(const ArgumentList &args)
bool machine_readable_output_
void ShowAlertsHelpMessage() const