Skip to main content

xcstrings_mcp/io/
mod.rs

1pub mod fs;
2
3use std::path::Path;
4use std::time::SystemTime;
5
6use crate::error::XcStringsError;
7
8pub trait FileStore: Send + Sync {
9    fn read(&self, path: &Path) -> Result<String, XcStringsError>;
10    fn read_bytes(&self, path: &Path) -> Result<Vec<u8>, XcStringsError>;
11    fn write(&self, path: &Path, content: &str) -> Result<(), XcStringsError>;
12    fn modified_time(&self, path: &Path) -> Result<SystemTime, XcStringsError>;
13    fn exists(&self, path: &Path) -> bool;
14    fn create_parent_dirs(&self, path: &Path) -> Result<(), XcStringsError>;
15}