MCPcopy Create free account
hub / github.com/apache/httpd / pfs_purge

Function pfs_purge

modules/md/md_store_fs.c:749–770  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

747}
748
749static apr_status_t pfs_purge(void *baton, apr_pool_t *p, apr_pool_t *ptemp, va_list ap)
750{
751 md_store_fs_t *s_fs = baton;
752 const char *dir, *name, *groupname;
753 md_store_group_t group;
754 apr_status_t rv;
755
756 (void)p;
757 group = (md_store_group_t)va_arg(ap, int);
758 name = va_arg(ap, const char*);
759
760 groupname = md_store_group_name(group);
761
762 if (MD_OK(md_util_path_merge(&dir, ptemp, s_fs->base, groupname, name, NULL))) {
763 /* Remove all files in dir, there should be no sub-dirs */
764 rv = md_util_rm_recursive(dir, ptemp, 1);
765 }
766 if (!APR_STATUS_IS_ENOENT(rv)) {
767 md_log_perror(MD_LOG_MARK, MD_LOG_TRACE2, rv, ptemp, "purge %s/%s (%s)", groupname, name, dir);
768 }
769 return APR_SUCCESS;
770}
771
772static apr_status_t fs_purge(md_store_t *store, apr_pool_t *p,
773 md_store_group_t group, const char *name)

Callers

nothing calls this directly

Calls 4

md_store_group_nameFunction · 0.85
md_util_path_mergeFunction · 0.85
md_util_rm_recursiveFunction · 0.85
md_log_perrorFunction · 0.85

Tested by

no test coverage detected