pub struct StorageManager { /* private fields */ }Implementations§
Source§impl StorageManager
impl StorageManager
pub fn new(config: Config, index: Box<dyn IndexStore>) -> Self
pub fn store_file( &mut self, file_path: &Path, delete_source: bool, ) -> Result<()>
pub fn owe_file(&mut self, file_path: &Path) -> Result<()>
pub fn list_files(&self) -> Result<Vec<FileEntry>>
pub fn search_files(&self, pattern: &str) -> Result<Vec<FileEntry>>
pub fn rename_file(&mut self, old_path: &Path, new_path: &Path) -> Result<()>
pub fn move_file(&mut self, file_path: &Path, new_location: &Path) -> Result<()>
pub fn delete_file(&mut self, file_path: &Path) -> Result<()>
pub fn store_files_from_list( &mut self, list_file: &Path, delete_source: bool, ) -> Result<()>
pub fn owe_files_from_list(&mut self, list_file: &Path) -> Result<()>
Sourcepub fn glob_to_regex(&self, pattern: &str) -> Result<String>
pub fn glob_to_regex(&self, pattern: &str) -> Result<String>
将通配符模式转换为正则表达式
pub fn owe_all_files(&mut self) -> Result<()>
Sourcepub fn get_dedup_stats(&self) -> DedupStats
pub fn get_dedup_stats(&self) -> DedupStats
获取去重统计信息
Sourcepub fn get_delta_stats(&self) -> DeltaStats
pub fn get_delta_stats(&self) -> DeltaStats
获取差分存储统计信息
Sourcepub fn is_dedup_enabled(&self) -> bool
pub fn is_dedup_enabled(&self) -> bool
检查是否启用去重功能
Sourcepub fn is_delta_enabled(&self) -> bool
pub fn is_delta_enabled(&self) -> bool
检查是否启用差分存储功能
Sourcepub fn get_similarity_threshold(&self) -> f32
pub fn get_similarity_threshold(&self) -> f32
获取当前相似度阈值
Auto Trait Implementations§
impl Freeze for StorageManager
impl !RefUnwindSafe for StorageManager
impl !Send for StorageManager
impl !Sync for StorageManager
impl Unpin for StorageManager
impl !UnwindSafe for StorageManager
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more