Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=cfpm.git;a=commitdiff;h=49cf2a7fb019de51c66679b2dd83361e58bfa753

commit 49cf2a7fb019de51c66679b2dd83361e58bfa753
Author: Priyank <priy...@frugalware.org>
Date:   Tue Jun 9 00:12:55 2009 +0530

new method Package::getFiles()

* returns a List* of files that are installed by the package

diff --git a/pm.cc b/pm.cc
index 9cbc1b9..ada0752 100644
--- a/pm.cc
+++ b/pm.cc
@@ -318,6 +318,19 @@ int Package::getReason()
return ret;
}

+List* Package::getFiles()
+{
+       List    *lst = NULL;
+       PM_LIST *l = NULL;
+
+       l = (PM_LIST*) getInfo(PM_PKG_FILES);
+       if ( l )
+       {
+               lst = new List(l);
+       }
+       return lst;
+}
+
PackageList* Package::getProvides()
{
PackageList *ret = NULL;
diff --git a/pm.hh b/pm.hh
index 594b20f..e34c739 100644
--- a/pm.hh
+++ b/pm.hh
@@ -74,6 +74,7 @@ namespace PM
int getCompressedSize();
int getUncompressedSize();
int getReason();
+                       List* getFiles();
PackageList* getDepends();
PackageList* getRemoves();
PackageList* getReplaces();
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to