aboutsummaryrefslogtreecommitdiff
path: root/bpkg/archive.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'bpkg/archive.hxx')
-rw-r--r--bpkg/archive.hxx16
1 files changed, 11 insertions, 5 deletions
diff --git a/bpkg/archive.hxx b/bpkg/archive.hxx
index 17e854a..8100870 100644
--- a/bpkg/archive.hxx
+++ b/bpkg/archive.hxx
@@ -20,8 +20,9 @@ namespace bpkg
package_dir (const path& archive);
// Start the process of extracting the specified file from the archive. If
- // error is false, then redirect stderr to /dev/null (this can be used, for
- // example, to suppress diagnostics).
+ // diag is false, then redirect stderr to /dev/null (this can be used, for
+ // example, to suppress diagnostics). Note that in this case process errors
+ // (like unable to start) are still printed.
//
// Return a pair of processes that form a pipe. Wait on the second first.
//
@@ -29,12 +30,17 @@ namespace bpkg
start_extract (const common_options&,
const path& archive,
const path& file,
- bool error = true);
+ bool diag = true);
- // Start as above and then extract the file content as a string.
+ // Start as above and then extract the file content as a string. If diag is
+ // false, then don't issue diagnostics about the reason why the file can't
+ // be extracted (not present, the archive is broken, etc).
//
string
- extract (const common_options&, const path& archive, const path& file);
+ extract (const common_options&,
+ const path& archive,
+ const path& file,
+ bool diag = true);
}
#endif // BPKG_ARCHIVE_HXX