aboutsummaryrefslogtreecommitdiff
path: root/bpkg/archive.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'bpkg/archive.hxx')
-rw-r--r--bpkg/archive.hxx14
1 files changed, 11 insertions, 3 deletions
diff --git a/bpkg/archive.hxx b/bpkg/archive.hxx
index d5f9390..44b3f01 100644
--- a/bpkg/archive.hxx
+++ b/bpkg/archive.hxx
@@ -1,12 +1,9 @@
// file : bpkg/archive.hxx -*- C++ -*-
-// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
#ifndef BPKG_ARCHIVE_HXX
#define BPKG_ARCHIVE_HXX
-#include <libbutl/process.mxx>
-
#include <bpkg/types.hxx>
#include <bpkg/utility.hxx>
@@ -48,6 +45,17 @@ namespace bpkg
const path& archive,
const path& file,
bool diag = true);
+
+ // Start the processes similar to the above functions but execute tar in the
+ // archive contents listing mode (-t) and then parse its stdout as a list of
+ // paths (one per line). If diag is false, then don't issue diagnostics
+ // about the reason why the contents can't be obtained (the archive is
+ // broken, etc).
+ //
+ paths
+ archive_contents (const common_options&,
+ const path& archive,
+ bool diag = true);
}
#endif // BPKG_ARCHIVE_HXX