pub struct DotManager { /* private fields */ }
Expand description
Dot folder manager for VTCode configuration and cache
Implementations§
Source§impl DotManager
impl DotManager
pub fn new() -> Result<Self, DotError>
Sourcepub fn initialize(&self) -> Result<(), DotError>
pub fn initialize(&self) -> Result<(), DotError>
Initialize the dot folder structure
Sourcepub fn load_config(&self) -> Result<DotConfig, DotError>
pub fn load_config(&self) -> Result<DotConfig, DotError>
Load configuration from disk
Sourcepub fn save_config(&self, config: &DotConfig) -> Result<(), DotError>
pub fn save_config(&self, config: &DotConfig) -> Result<(), DotError>
Save configuration to disk
Sourcepub fn update_config<F>(&self, updater: F) -> Result<(), DotError>
pub fn update_config<F>(&self, updater: F) -> Result<(), DotError>
Update configuration with new values
Sourcepub fn sessions_dir(&self) -> PathBuf
pub fn sessions_dir(&self) -> PathBuf
Get sessions directory
Sourcepub fn backups_dir(&self) -> PathBuf
pub fn backups_dir(&self) -> PathBuf
Get backups directory
Sourcepub fn cleanup_cache(&self) -> Result<CacheCleanupStats, DotError>
pub fn cleanup_cache(&self) -> Result<CacheCleanupStats, DotError>
Clean up old cache files
Sourcepub fn disk_usage(&self) -> Result<DiskUsageStats, DotError>
pub fn disk_usage(&self) -> Result<DiskUsageStats, DotError>
Get disk usage statistics
Sourcepub fn backup_config(&self) -> Result<PathBuf, DotError>
pub fn backup_config(&self) -> Result<PathBuf, DotError>
Backup current configuration
Auto Trait Implementations§
impl Freeze for DotManager
impl RefUnwindSafe for DotManager
impl Send for DotManager
impl Sync for DotManager
impl Unpin for DotManager
impl UnwindSafe for DotManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more