23 namespace swissknife {
31 assert(!local_path.empty());
33 if (!FetchObject(catalog_hash, local_path)) {
37 const std::string catalog_root_path =
"";
64 assert(!local_path.empty());
66 if (history_hash.
IsNull()) {
69 if (NULL == history) {
76 if (!FetchObject(history_hash, local_path))
90 if (history == NULL) {
93 unlink(local_path.c_str());
102 bool Assistant::FetchObject(
const shash::Any &
id,
const string &local_path) {
106 const std::string url = repository_url_ +
"/data/" +
id.MakePath();
114 id.ToStringWithSuffix().c_str(),
download::DownloadManager * download_mgr_
static SqliteHistory * Open(const std::string &file_name)
const history::History * history() const
std::string CreateTempPath(const std::string &path_prefix, const int mode)
assert((mem||(size==0))&&"Out Of Memory")
const std::string & fqrn() const
static SqliteHistory * OpenWritable(const std::string &file_name)
static WritableCatalog * AttachFreely(const std::string &root_path, const std::string &file, const shash::Any &catalog_hash, Catalog *parent=NULL, const bool is_not_root=false)
const char * Code2Ascii(const Failures error)
std::string repository_name() const
const char kSuffixCatalog
void TakeDatabaseFileOwnership()
manifest::Manifest * manifest_
Failures Fetch(JobInfo *info)
shash::Any history() const
virtual void TakeDatabaseFileOwnership()=0
static Catalog * AttachFreely(const std::string &imaginary_mountpoint, const std::string &file, const shash::Any &catalog_hash, Catalog *parent=NULL, const bool is_nested=false)
static SqliteHistory * Create(const std::string &file_name, const std::string &fqrn)
CVMFS_EXPORT void LogCvmfs(const LogSource source, const int mask, const char *format,...)