pub struct Unzip {
pub zip_pwd: Option<String>,
}Fields§
§zip_pwd: Option<String>Implementations§
Trait Implementations§
Source§impl Zip for Unzip
impl Zip for Unzip
Source§fn calculate_size(&self, path: &str) -> Result<f64, BridgeError>
fn calculate_size(&self, path: &str) -> Result<f64, BridgeError>
Calculate file size
Source§fn compress_file(
&self,
input_path: &str,
out_path: &str,
) -> Result<bool, BridgeError>
fn compress_file( &self, input_path: &str, out_path: &str, ) -> Result<bool, BridgeError>
Pay special attention to compressing files in zip format, as it is a single file, not a folder
Source§fn add_dir_to_zip<P: AsRef<Path>>(
&self,
base_dir: P,
current_dir: P,
zip_writer: &mut ZipWriter<File>,
) -> Result<bool, BridgeError>
fn add_dir_to_zip<P: AsRef<Path>>( &self, base_dir: P, current_dir: P, zip_writer: &mut ZipWriter<File>, ) -> Result<bool, BridgeError>
Recursive compression folder
Source§fn compress_multiple(
&self,
input_paths: Vec<&str>,
out_path: &str,
) -> Result<bool, BridgeError>
fn compress_multiple( &self, input_paths: Vec<&str>, out_path: &str, ) -> Result<bool, BridgeError>
Compress multiple files
Source§fn is_empty_directory<P: AsRef<Path>>(
&self,
path: P,
) -> Result<bool, BridgeError>
fn is_empty_directory<P: AsRef<Path>>( &self, path: P, ) -> Result<bool, BridgeError>
Determine if the directory is empty
Source§fn add_path_to_zip<P: AsRef<Path>>(
&self,
zip_writer: &mut ZipWriter<&mut Cursor<Vec<u8>>>,
path: P,
) -> Result<bool, BridgeError>
fn add_path_to_zip<P: AsRef<Path>>( &self, zip_writer: &mut ZipWriter<&mut Cursor<Vec<u8>>>, path: P, ) -> Result<bool, BridgeError>
Add path to zip file
Source§fn compress_folder<P: AsRef<Path>>(
&self,
input_paths: P,
out_file: P,
) -> Result<bool, BridgeError>
fn compress_folder<P: AsRef<Path>>( &self, input_paths: P, out_file: P, ) -> Result<bool, BridgeError>
Compressed Folder
fn add_absolute_dir_to_zip<P: AsRef<Path>>( &self, zip_writer: &mut ZipWriter<&mut Cursor<Vec<u8>>>, path: P, prefix: &Path, ) -> Result<bool, BridgeError>
Auto Trait Implementations§
impl Freeze for Unzip
impl RefUnwindSafe for Unzip
impl Send for Unzip
impl Sync for Unzip
impl Unpin for Unzip
impl UnwindSafe for Unzip
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more