diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2019-09-11 13:10:46 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2019-11-26 22:07:28 +0100 |
commit | d33dd6e6c09d87a59989057ad622a6265ddec2e0 (patch) | |
tree | a05bc9fef86c320e0b72225e5dba6c8b61044f19 /src/libutil/tarfile.cc | |
parent | d14b1c261cd3dfb4be2da943d901a394c3f23205 (diff) |
Move code around
Diffstat (limited to 'src/libutil/tarfile.cc')
-rw-r--r-- | src/libutil/tarfile.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/libutil/tarfile.cc b/src/libutil/tarfile.cc new file mode 100644 index 000000000..ae6d512bd --- /dev/null +++ b/src/libutil/tarfile.cc @@ -0,0 +1,14 @@ +#include "rust-ffi.hh" + +extern "C" { + rust::CBox2<rust::Result<std::tuple<>>> unpack_tarfile(rust::Source source, rust::StringSlice dest_dir); +} + +namespace nix { + +void unpackTarfile(Source & source, Path destDir) +{ + unpack_tarfile(source, destDir).use()->unwrap(); +} + +} |