aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/archive.rs21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/archive.rs b/src/archive.rs
index f76d55c..268bb47 100644
--- a/src/archive.rs
+++ b/src/archive.rs
@@ -85,7 +85,26 @@ where
/// Write a tarball of `dir` in `out`.
///
/// The target directory will be saved as a top-level directory in the archive.
-/// For example, if given `"a/b/c"`, it will be stored as just `"c"` in the archive.
+///
+/// For example, consider this directory structure:
+///
+/// ```
+/// a
+/// └── b
+/// └── c
+/// ├── e
+/// ├── f
+/// └── g
+/// ```
+///
+/// Making a tarball out of `"a/b/c"` will result in this archive content:
+///
+/// ```
+/// c
+/// ├── e
+/// ├── f
+/// └── g
+/// ```
fn tar_dir<W>(dir: &Path, skip_symlinks: bool, out: W) -> Result<(), ContextualError>
where
W: std::io::Write,