From d452df33a8b702c9992da01e5963e4c4d89f0689 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 10 Mar 2016 11:34:05 +0300 Subject: Make rep_create to convert file-type manifest values to corresponding inline-type ones --- bpkg/archive | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 bpkg/archive (limited to 'bpkg/archive') diff --git a/bpkg/archive b/bpkg/archive new file mode 100644 index 0000000..4d90384 --- /dev/null +++ b/bpkg/archive @@ -0,0 +1,38 @@ +// file : bpkg/archive -*- C++ -*- +// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +#ifndef BPKG_ARCHIVE +#define BPKG_ARCHIVE + +#include + +#include +#include + +#include + +namespace bpkg +{ + // Return the package directory based on the package archive. + // + dir_path + package_dir (const path& archive); + + // Start the process of extracting the specified file from the archive. If + // error is false, then redirect STDERR to STDOUT (this can be used, for + // example, to suppress diagnostics). + // + butl::process + start_extract (const common_options&, + const path& archive, + const path& file, + bool error = true); + + // Start as above and then extract the file content as a string. + // + string + extract (const common_options&, const path& archive, const path& file); +} + +#endif // BPKG_ARCHIVE -- cgit v1.1