1use std::error::Error;
2use std::path::Path;
3use std::io::{Read, Write};
4use url::Url;
5use ssh2::{Session, Sftp};
6use crate::progress::create_progress_bar;
7use crate::config::ProxyConfig;
8use crate::optimization::Optimizer;
9use crate::utils::print;
10
11pub struct SftpDownloader {
12 url: String,
13 output: String,
14 quiet: bool,
15 proxy: ProxyConfig,
16 optimizer: Optimizer,
17}
18
19impl SftpDownloader {
20 pub fn new(url: String, output: String, quiet: bool, proxy: ProxyConfig, optimizer: Optimizer) -> Self {
21 Self {
22 url,
23 output,
24 quiet,
25 proxy,
26 optimizer,
27 }
28 }
29
30 pub fn download(&self) -> Result<(), Box<dyn Error + Send + Sync>> {
31 Ok(())
33 }
34}