The fanalyse function analyzes the Flash File System and checks for file fragmentation on the specified drive. If the drive string is empty ("") the default drive specified in the FILE_CONFIG.C configuration file is used. The following values are supported for the drive: | Drive | Description |
|---|
| "F:" | Embedded Flash drive. | | "S:" | SPI Flash drive. | | "R:" | Ram drive. |
During analysis, the invalidated data size is compared to the stored file size and a fragmentation factor is calculated. A factor of 0 indicates no files are fragmented while a factor of 255 indicates most files are fragmented. If the fragmentation factor is high (above 50) you should invoke the fdefrag function to defragment the drive. The fanalyse function is in the RL-FlashFS library. The prototype is defined in rtl.h. Note - The fanalyse function can not analyze a Memory Card drive. If the specified drive is "M:", fanalyse returns an error.
|