Skip to content

Commit f19080d

Browse files
refactor(ipc): Update file system provider interface and export IPC functions
Updated the file system provider trait in WindServiceHandlers from `FileSystemProvider` to `FileSystemReader` to align with the latest common file system interface. The `StatFile` method call now uses a `PathBuf` reference instead of a `String`. Additionally, exported key IPC initialization functions in `mod.rs` to make them publicly available, improving module accessibility and integration with other components.
1 parent 2dabf6d commit f19080d

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

Source/IPC/WindServiceHandlers.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,9 @@ async fn handle_file_stat(
173173
.ok_or("File path must be a string".to_string())?;
174174

175175
// Use Mountain's file system provider
176-
let provider: Arc<dyn Common::FileSystem::FileSystemProvider::FileSystemProvider> = runtime.Environment.Require();
176+
let provider: Arc<dyn Common::FileSystem::FileSystemReader> = runtime.Environment.Require();
177177

178-
let stats = provider.StatFile(path.to_string())
178+
let stats = provider.StatFile(&PathBuf::from(path))
179179
.await
180180
.map_err(|e| format!("Failed to stat file: {}", e))?;
181181

Source/IPC/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,8 @@ pub mod ConfigurationBridge;
1212
pub mod StatusReporter;
1313
pub mod AdvancedFeatures;
1414
pub mod WindAdvancedSync;
15+
16+
pub use TauriIPCServer::register_wind_ipc_handlers;
17+
pub use StatusReporter::initialize_status_reporter;
18+
pub use AdvancedFeatures::initialize_advanced_features;
19+
pub use WindAdvancedSync::initialize_wind_advanced_sync;

0 commit comments

Comments
 (0)