5 #ifndef CVMFS_SWISSKNIFE_SCRUB_H_
6 #define CVMFS_SWISSKNIFE_SCRUB_H_
16 namespace swissknife {
22 virtual std::string
GetName()
const {
return "scrub"; }
24 return "CernVM File System repository file storage checker. Finds silent "
25 "disk corruptions by recomputing all file content checksums in the "
26 "backend file storage.";
49 const std::string &file_name);
51 const std::string &dir_name);
53 const std::string &symlink_name);
58 const std::string &path,
59 const std::string &affected_hash =
"")
const;
64 const std::string &file_name,
65 const std::string &full_path)
const;
67 const std::string &full_path)
const;
69 std::string
MakeFullPath(
const std::string &relative_path,
70 const std::string &file_name)
const;
83 #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