Skip to main content

FatAnalysisExt

Trait FatAnalysisExt 

Source
pub trait FatAnalysisExt<DATA: Read + Seek> {
    // Required methods
    fn statistics(&self) -> Result<FatStatistics>;
    fn fragmentation_report(
        &self,
        max_files: usize,
    ) -> Result<FragmentationReport>;
    fn scan_fat(&self) -> Result<Vec<ClusterState>>;
    fn get_cluster_chain(&self, first_cluster: u32) -> Result<Vec<u32>>;
}
Expand description

Extension trait for FatVolume providing analysis operations.

Required Methods§

Source

fn statistics(&self) -> Result<FatStatistics>

Gather statistics about the filesystem.

This scans the FAT table to count free, used, and bad clusters, and optionally scans the directory tree to count files and directories.

Source

fn fragmentation_report(&self, max_files: usize) -> Result<FragmentationReport>

Analyze filesystem fragmentation.

This scans all files in the filesystem and reports on their fragmentation. The max_files parameter limits how many of the most fragmented files are included in the report (default: 10).

Source

fn scan_fat(&self) -> Result<Vec<ClusterState>>

Scan the FAT table and return the state of each cluster.

Source

fn get_cluster_chain(&self, first_cluster: u32) -> Result<Vec<u32>>

Get the cluster chain for a file.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<DATA: Read + Seek> FatAnalysisExt<DATA> for FatVolume<DATA>