mirror of
https://github.com/ouch-org/ouch.git
synced 2025-06-06 19:45:29 +00:00
improve documentation of compress_files
This commit is contained in:
parent
79597f48bb
commit
f5fc7bd755
@ -19,13 +19,16 @@ use crate::{
|
|||||||
QuestionAction, QuestionPolicy, BUFFER_CAPACITY,
|
QuestionAction, QuestionPolicy, BUFFER_CAPACITY,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Compress files into an `output_file`
|
/// Compress files into `output_file`.
|
||||||
//
|
///
|
||||||
// - `files`: is the list of paths to be compressed: ["dir/file1.txt", "dir/file2.txt"]
|
/// # Arguments:
|
||||||
// - `extensions`: contains each compression format necessary for compressing, example: [Tar, Gz] (in compression order)
|
/// - `files`: is the list of paths to be compressed: ["dir/file1.txt", "dir/file2.txt"]
|
||||||
// - `output_file` is the resulting compressed file name, example: "compressed.tar.gz"
|
/// - `extensions`: is a list of compression formats for compressing, example: [Tar, Gz] (in compression order)
|
||||||
//
|
/// - `output_file` is the resulting compressed file name, example: "archive.tar.gz"
|
||||||
// Returns Ok(true) if compressed all files successfully, and Ok(false) if user opted to skip files
|
///
|
||||||
|
/// # Return value
|
||||||
|
/// - Returns `Ok(true)` if compressed all files normally.
|
||||||
|
/// - Returns `Ok(false)` if user opted to abort compression mid-way.
|
||||||
pub fn compress_files(
|
pub fn compress_files(
|
||||||
files: Vec<PathBuf>,
|
files: Vec<PathBuf>,
|
||||||
extensions: Vec<Extension>,
|
extensions: Vec<Extension>,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user