cvmfs/catalog_mgr_rw.cc
void WritableCatalogManager::AddFile(const DirectoryEntry  &entry,
                                     const std::string     &parent_directory) {
  const string parent_path = MakeRelativePath(parent_directory);
  const string file_path   = entry.GetFullPath(parent_path);

  SyncLock();
  WritableCatalog *catalog;
  if (!FindCatalog(parent_path, &catalog)) {
    LogCvmfs(kLogCatalog, kLogStderr, "catalog for file '%s' cannot be found",
             file_path.c_str());
    assert(false);
  }

  assert(!entry.IsRegular() || !entry.checksum().IsNull());
  catalog->AddEntry(entry, file_path, parent_path);
  SyncUnlock();
}
/**
 * Add a new file to the catalogs.
 * @param entry a DirectoryEntry structure describing the new file
 * @param parent_directory the absolute path of the directory containing the
 *                         file to be created
 * @return true on success, false otherwise
 */
Add a new file to the catalogs.
@param entry a DirectoryEntry structure describing the new file
@param parent_directory the absolute path of the directory containing the
file to be created
@return true on success, false otherwise
Add a new file to the catalogs . @param entry a DirectoryEntry structure describing the new file @param parent_directory the absolute path of the directory containing the file to be created @return true on success false otherwise
void WritableCatalogManager::AddFile(const DirectoryEntry  &entry,
                                     const std::string     &parent_directory) {
  const string parent_path = MakeRelativePath(parent_directory);
  const string file_path   = entry.GetFullPath(parent_path);
  SyncLock();
  WritableCatalog *catalog;
  if (!FindCatalog(parent_path, &catalog)) {
    LogCvmfs(kLogCatalog, kLogStderr, "catalog for file '%s' cannot be found",
             file_path.c_str());
    assert(false);
  }
  assert(!entry.IsRegular() || !entry.checksum().IsNull());
  catalog->AddEntry(entry, file_path, parent_path);
  SyncUnlock();
}
void WritableCatalogManager :: AddFile ( const DirectoryEntry & entry , const std :: string & parent_directory ) { const string parent_path = MakeRelativePath ( parent_directory ) ; const string file_path = entry . GetFullPath ( parent_path ) ; SyncLock ( ) ; WritableCatalog * catalog ; if ( ! FindCatalog ( parent_path , & catalog ) ) { LogCvmfs ( kLogCatalog , kLogStderr , " " , file_path . c_str ( ) ) ; assert ( false ) ; } assert ( ! entry . IsRegular ( ) || ! entry . checksum ( ) . IsNull ( ) ) ; catalog -> AddEntry ( entry , file_path , parent_path ) ; SyncUnlock ( ) ; }
Add a new file to the catalogs.
Add a new file to the catalogs .