added cargo doc comments

This commit is contained in:
specCon18 2025-03-22 15:28:46 -04:00
parent 1a6126c2ad
commit ba20ea4e2a
3 changed files with 24 additions and 3 deletions

4
Cargo.lock generated
View file

@ -638,9 +638,9 @@ checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964"
[[package]]
name = "proc-macro2"
version = "1.0.66"
version = "1.0.94"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9"
checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84"
dependencies = [
"unicode-ident",
]

View file

@ -5,6 +5,8 @@ use bzip2::read::BzDecoder;
use unrar::Archive;
use ar;
//TODO: P:1 refactor and extract like code
/// Extracts files from a ZIP archive.
///
/// # Arguments
@ -367,7 +369,24 @@ pub fn extract_txz(input_path: &Path, output_directory: &Path) -> Result<(), io:
}
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>{
let input_file =File::open(&input_path).unwrap();
// Read an archive from the file foo.a:

View file

@ -25,6 +25,8 @@ use sk_extract::extractors::{
// extract_xar,
// extract_exe
};
fn main() {
std::process::exit(run());
}