INNER CODE UNIT · Rust

new

HemantKArya/BloomeeTunes · rust/src/api/downloader/mod.rs:74

    pub async fn new(
        plugin_manager: PluginManager,
        state_dir: String,
        temp_dir: String,
        max_concurrent_tasks: u32,
    ) -> Result<Self, String> {
        tokio::fs::create_dir_all(&state_dir)
            .await
            .map_err(|e| format!("Failed to create download state dir: {e}"))?;
        tokio::fs::create_dir_all(&temp_dir)
            .await
            .map_err(|e| format!("Failed to create download temp dir: {e}"))?;

        let manifest_path = Path::new(&state_dir)
            .join("downloads_state.json")
            .to_string_lossy()
            .into_owned();

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…