api/download_work_dir_files.py.dox.md
download_work_dir_files.py API endpoint.download_work_dir_files.py because this directory is intentionally flat.download_work_dir_files.py owns the runtime implementation.download_work_dir_files.py.dox.md owns durable notes about responsibilities, contracts, side effects, and verification for that implementation.DownloadFiles (ApiHandler)
async process(self, input: Input, request: Request) -> Outputnormalize_paths(paths) -> list[str]selected_archive_name(count: int) -> strcreate_selected_zip(paths: list[str], current_path: str=...) -> strresolve_download_path(path: str, base_dir: Path) -> Pathcollapse_nested_paths(paths: list[Path]) -> list[Path]archive_root_name(source_path: Path, current_dir: Path | None, base_dir: Path) -> strunique_archive_name(name: str, used_names: set[str]) -> strwrite_zip_entry(zip_file: zipfile.ZipFile, source_path: Path, arc_root: str) -> Nonehelpers.api.ApiHandler; WebSocket handlers must derive from helpers.ws.WsHandler.DownloadFiles is an ApiHandler.DownloadFiles defines process(...).api.download_work_dir_file, base64, flask, helpers, helpers.api, helpers.localization, io, os, pathlib, tempfile, zipfile.Localization.get.now.strftime, Path.resolve, normalize_paths, collapse_nested_paths, Path, os.path.splitext, source_path.is_dir, zip_file.write, selected_archive_name, runtime.is_development, stream_file_download, ValueError, raw_path.strip, resolve_download_path, current_dir.is_file, resolved.exists, FileNotFoundError, tempfile.NamedTemporaryFile, zipfile.ZipFile, candidate.is_absolute.helpers.api.Response for non-JSON responses, files, redirects, or status-specific replies.tests/test_download_toast_regressions.pyNo child DOX files.