]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/aptconfiguration.cc
* apt-pkg/deb/dpkgpm.cc:
[apt.git] / apt-pkg / aptconfiguration.cc
index 2a441fce7bf6140c10e0649e711fc963551c90f0..b23e12acb42e78175f4e78bc3d920cd5d5640652 100644 (file)
@@ -388,6 +388,19 @@ const Configuration::getCompressors(bool const Cached) {
        return compressors;
 }
                                                                        /*}}}*/
+// getCompressorExtensions - supported data.tar extensions             /*{{{*/
+// ---------------------------------------------------------------------
+/* */
+std::vector<std::string> const Configuration::getCompressorExtensions() {
+       std::vector<APT::Configuration::Compressor> const compressors = getCompressors();
+       std::vector<std::string> ext;
+       for (std::vector<APT::Configuration::Compressor>::const_iterator c = compressors.begin();
+            c != compressors.end(); ++c)
+               if (c->Extension.empty() == false && c->Extension != ".")
+                       ext.push_back(c->Extension);
+       return ext;
+}
+                                                                       /*}}}*/
 // Compressor constructor                                              /*{{{*/
 // ---------------------------------------------------------------------
 /* */