PakfirePackageList pakfire_whatprovides(Pakfire pakfire, const char* provides, int flags);
PakfirePackageList pakfire_search(Pakfire pakfire, const char* what, int flags);
-int pakfire_cache_destroy(Pakfire pakfire, const char* path);
-
// Logging
int pakfire_log_get_priority(Pakfire pakfire);
return 0;
}
-PAKFIRE_EXPORT int pakfire_cache_destroy(Pakfire pakfire, const char* path) {
- char cache_path[PATH_MAX];
-
- pakfire_make_cache_path(pakfire, cache_path, "%s", path);
-
- // Completely delete the tree of files
- return pakfire_rmtree(cache_path, 0);
-}
-
PAKFIRE_EXPORT int pakfire_log_get_priority(Pakfire pakfire) {
return pakfire->log_priority;
}
PAKFIRE_EXPORT int pakfire_repo_clean(PakfireRepo repo) {
char cache_path[PATH_MAX];
+ // Destroy all files in the cache directory
int r = pakfire_make_cache_path(repo->pakfire, cache_path,
"%s", pakfire_repo_get_name(repo));
if (r < 0)
return r;
- return pakfire_cache_destroy(repo->pakfire, cache_path);
+ return pakfire_rmtree(cache_path, 0);
}
static int pakfire_repo_scan_file(PakfireRepo repo, const char* path) {