pub struct FileService { /* private fields */ }Implementations§
Source§impl FileService
impl FileService
pub fn new(root_dir: impl Into<PathBuf>) -> Result<Self, FileServiceError>
pub fn root_dir(&self) -> &Path
pub fn list_dir( &self, requested_path: &str, ) -> Result<DirectoryListing, FileServiceError>
pub fn search(&self, query: &str) -> Result<SearchResults, FileServiceError>
pub fn entry_kind( &self, requested_path: &str, ) -> Result<FileKind, FileServiceError>
pub fn storage_usage(&self) -> Result<StorageUsage, FileServiceError>
pub fn delete_entries( &self, requested_paths: &[String], ) -> Result<DeleteSummary, FileServiceError>
pub fn move_operation_count_to( &self, requested_paths: &[String], target: &FileService, ) -> Result<usize, FileServiceError>
pub fn move_entries_to( &self, requested_paths: &[String], target: &FileService, on_progress: impl FnMut(usize, usize, &str), ) -> Result<MoveSummary, FileServiceError>
pub fn collect_download_assets( &self, requested_paths: &[String], ) -> Result<Vec<FileAsset>, FileServiceError>
pub fn file_asset( &self, requested_path: &str, ) -> Result<FileAsset, FileServiceError>
pub fn read_text_excerpt( &self, asset: &FileAsset, max_bytes: usize, ) -> Result<String, FileServiceError>
pub fn search_with_limit( &self, query: &str, limit: usize, ) -> Result<SearchResults, FileServiceError>
Trait Implementations§
Source§impl Clone for FileService
impl Clone for FileService
Source§fn clone(&self) -> FileService
fn clone(&self) -> FileService
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FileService
impl RefUnwindSafe for FileService
impl Send for FileService
impl Sync for FileService
impl Unpin for FileService
impl UnsafeUnpin for FileService
impl UnwindSafe for FileService
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