added cargo doc comments
This commit is contained in:
parent
1a6126c2ad
commit
ba20ea4e2a
3 changed files with 24 additions and 3 deletions
4
Cargo.lock
generated
4
Cargo.lock
generated
|
|
@ -638,9 +638,9 @@ checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "proc-macro2"
|
name = "proc-macro2"
|
||||||
version = "1.0.66"
|
version = "1.0.94"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9"
|
checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"unicode-ident",
|
"unicode-ident",
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@ use bzip2::read::BzDecoder;
|
||||||
use unrar::Archive;
|
use unrar::Archive;
|
||||||
use ar;
|
use ar;
|
||||||
|
|
||||||
|
|
||||||
|
//TODO: P:1 refactor and extract like code
|
||||||
/// Extracts files from a ZIP archive.
|
/// Extracts files from a ZIP archive.
|
||||||
///
|
///
|
||||||
/// # Arguments
|
/// # Arguments
|
||||||
|
|
@ -367,7 +369,24 @@ pub fn extract_txz(input_path: &Path, output_directory: &Path) -> Result<(), io:
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
//TODO: P:5 add cargo doc
|
||||||
|
/// Extracts files from a DEB (.deb) compressed archive.
|
||||||
|
///
|
||||||
|
/// # Arguments
|
||||||
|
///
|
||||||
|
/// * `input_path` - The path to the DEB compressed file to extract.
|
||||||
|
///
|
||||||
|
/// # Returns
|
||||||
|
///
|
||||||
|
/// Returns `Ok(())` on success.
|
||||||
|
///
|
||||||
|
/// # Examples
|
||||||
|
///
|
||||||
|
/// ```
|
||||||
|
/// use std::path::Path;
|
||||||
|
/// let result = extract_deb(Path::new("src/test_data/test.deb"));
|
||||||
|
/// assert!(result.is_ok());
|
||||||
|
/// ```
|
||||||
pub fn extract_deb(input_path: &Path,) -> Result<(),io::Error>{
|
pub fn extract_deb(input_path: &Path,) -> Result<(),io::Error>{
|
||||||
let input_file =File::open(&input_path).unwrap();
|
let input_file =File::open(&input_path).unwrap();
|
||||||
// Read an archive from the file foo.a:
|
// Read an archive from the file foo.a:
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,8 @@ use sk_extract::extractors::{
|
||||||
// extract_xar,
|
// extract_xar,
|
||||||
// extract_exe
|
// extract_exe
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
std::process::exit(run());
|
std::process::exit(run());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue