cvmfs/catalog_mgr_rw.cc
bool WritableCatalogManager::FindCatalog(const string     &path,
                                         WritableCatalog **result,
                                         DirectoryEntry   *dirent) {
  const PathString ps_path(path);

  Catalog *best_fit =
    AbstractCatalogManager<Catalog>::FindCatalog(ps_path);
  assert(best_fit != NULL);
  Catalog *catalog = NULL;
  bool retval = MountSubtree(ps_path, best_fit, &catalog);
  if (!retval)
    return false;

  catalog::DirectoryEntry dummy;
  if (NULL == dirent) {
    dirent = &dummy;
  }
  bool found = catalog->LookupPath(ps_path, dirent);
  if (!found || !catalog->IsWritable())
    return false;

  *result = static_cast<WritableCatalog *>(catalog);
  return true;
}
/**
 * Retrieve the catalog containing the given path.
 * Other than AbstractCatalogManager::FindCatalog() this mounts nested
 * catalogs if necessary and returns  WritableCatalog objects.
 * Furthermore it optionally returns the looked-up DirectoryEntry.
 *
 * @param path    the path to look for
 * @param result  the retrieved catalog (as a pointer)
 * @param dirent  is set to looked up DirectoryEntry for 'path' if non-NULL
 * @return        true if catalog was found
 */
Retrieve the catalog containing the given path.
Other than AbstractCatalogManager::FindCatalog() this mounts nested
catalogs if necessary and returns  WritableCatalog objects.
Furthermore it optionally returns the looked-up DirectoryEntry.

@param path    the path to look for
@param result  the retrieved catalog (as a pointer)
@param dirent  is set to looked up DirectoryEntry for 'path' if non-NULL
@return        true if catalog was found
Retrieve the catalog containing the given path . Other than AbstractCatalogManager :: FindCatalog () this mounts nested catalogs if necessary and returns WritableCatalog objects . Furthermore it optionally returns the looked - up DirectoryEntry . @param path the path to look for @param result the retrieved catalog ( as a pointer ) @param dirent is set to looked up DirectoryEntry for ' path ' if non - NULL @return true if catalog was found
bool WritableCatalogManager::FindCatalog(const string     &path,
                                         WritableCatalog **result,
                                         DirectoryEntry   *dirent) {
  const PathString ps_path(path);
  Catalog *best_fit =
    AbstractCatalogManager<Catalog>::FindCatalog(ps_path);
  assert(best_fit != NULL);
  Catalog *catalog = NULL;
  bool retval = MountSubtree(ps_path, best_fit, &catalog);
  if (!retval)
    return false;
  catalog::DirectoryEntry dummy;
  if (NULL == dirent) {
    dirent = &dummy;
  }
  bool found = catalog->LookupPath(ps_path, dirent);
  if (!found || !catalog->IsWritable())
    return false;
  *result = static_cast<WritableCatalog *>(catalog);
  return true;
}
bool WritableCatalogManager :: FindCatalog ( const string & path , WritableCatalog * * result , DirectoryEntry * dirent ) { const PathString ps_path ( path ) ; Catalog * best_fit = AbstractCatalogManager < Catalog > :: FindCatalog ( ps_path ) ; assert ( best_fit != NULL ) ; Catalog * catalog = NULL ; bool retval = MountSubtree ( ps_path , best_fit , & catalog ) ; if ( ! retval ) return false ; catalog :: DirectoryEntry dummy ; if ( NULL == dirent ) { dirent = & dummy ; } bool found = catalog -> LookupPath ( ps_path , dirent ) ; if ( ! found || ! catalog -> IsWritable ( ) ) return false ; * result = static_cast < WritableCatalog * > ( catalog ) ; return true ; }
Retrieve the catalog containing the given path.
Retrieve the catalog containing the given path .