24 throw(
INTERNAL_ERROR(0,
"Attempt to allocate multiple catalog managers"));
51 subdirectory::const_iterator sdi;
61 if (subdir.size() == 0)
63 lstr =
"Cataloger - Erasing old link catalog...\n";
65 for (sdi = subdir.begin(); sdi != subdir.end(); ++sdi) {
72 lstr =
"Cataloger - Finished erasing link catalog\n";
81 subdirectory::const_iterator si;
82 configuration_manager::vaults_type::const_iterator vi;
92 lstr =
"Cataloger - Building link catalog...\n";
100 if (subdir.size() == 0)
102 for (si = subdir.begin(); si != subdir.end(); ++si) {
128 lstr =
"Cataloger - Finished building link catalog\n";
std::string reform_path(const std::string &a_path)
Reformat a path to remove double slashes.
log_manager logger
The global log manager.
Create and maintain a directory of links to all archives on all vaults.
An extended string class.
void catalog(void)
Create or update the catalog.
void clear(void)
Reset the catalog manager.
#define TRY_log(code, es)
void write(const std::string &a_str, const uint16 a_indention=0, const configuration_manager::logging_type a_logging_level=configuration_manager::logging_manager, const pid_t a_pid=pid())
Write a string to the log file.
const vaults_type & vaults(void) const
Return the vaults.
const bool initialized(void) const
Return the initialized status.
catalog_manager cataloger
The global catalog manager.
const type & path(const std::string a_path, const std::string a_filter="*")
Return a vector of strings of a list of files in a subdirectory.
void mk_relative_symlink(const std::string a_from, const std::string a_to)
Given a from and to path, create a relative symbolic link.
void rm_recursive(const std::string a_path)
Recursively delete the contents of a directory.
#define INTERNAL_ERROR(e, s)
configuration_manager config
The global configuration manager instance.
const std::string & link_catalog_dir(void) const
Return the link-catalog-dir path.
bool is_timestamp(const std::string &a_s)
Return true if the string is a valid timestamp.
void init(void)
Initialize the catalog manager.
Retrieve a list of files in a subdirectory that match a given wildcard filename.
void erase(void)
Erase the contents of the catalog.