.tasks/core/CORE-014-file-opening-system.md
Implement the backend infrastructure for opening files with default and specific applications across macOS, Windows, and Linux. This ports v1's sophisticated platform-specific implementation to v2's architecture.
Create platform-specific crates following v1's proven architecture:
apps/tauri/crates/file-opening/ - Shared types and traitsapps/tauri/crates/file-opening-macos/ - Swift via FFI using NSWorkspace APIsapps/tauri/crates/file-opening-windows/ - COM Shell APIs (SHAssocEnumHandlers)apps/tauri/crates/file-opening-linux/ - GTK/GIO with content type detectionEach platform implementation must:
See DESIGN-open-with.md for complete architecture details.
file-opening crate with FileOpener trait and typesurlsForApplications(toOpen:) API/Applications/ directorySHAssocEnumHandlersAppInfo::recommended_for_typelaunch_default_for_uriget_apps_for_paths(paths) - returns Vec<OpenWithApp>open_path_default(path) - returns OpenResultopen_path_with_app(path, app_id) - returns OpenResultopen_paths_with_app(paths, app_id) - returns Vec<OpenResult>To be created:
apps/tauri/crates/file-opening/src/lib.rsapps/tauri/crates/file-opening/src/types.rsapps/tauri/crates/file-opening-macos/src/lib.rsapps/tauri/crates/file-opening-macos/src-swift/FileOpening.swiftapps/tauri/crates/file-opening-windows/src/lib.rsapps/tauri/crates/file-opening-linux/src/lib.rsapps/tauri/src-tauri/src/commands/file_opening.rsTo be modified:
apps/tauri/src-tauri/src/main.rs (register commands and service)apps/tauri/src-tauri/Cargo.toml (add dependencies)v1 implementation can be found at:
~/Projects/spacedrive_v1/apps/desktop/src-tauri/src/file.rs~/Projects/spacedrive_v1/apps/desktop/crates/macos/src-swift/files.swift~/Projects/spacedrive_v1/apps/desktop/crates/windows/src/lib.rs~/Projects/spacedrive_v1/apps/desktop/crates/linux/src/app_info.rs