pub fn clear_cache<P: AsRef<Path>>(subpath: P) -> Result<()>
Expand description

Deletes FASTSim data directory, clearing its contents. If subpath is provided, will only delete the subdirectory pointed to by the subpath, rather than deleting the whole data directory. If the subpath is an empty string, deletes the entire FASTSim directory.
USE WITH CAUTION, as this function deletes ALL objects stored in the FASTSim data directory or provided subdirectory.

§Arguments

  • subpath: Subpath to a subdirectory within the FASTSim data directory. If an empty string, the function will delete the whole FASTSim data directory, clearing all its contents.
    Note: it is not possible to delete single files using this function, only directories. If a single file needs deleting, the path_to_cache() function can be used to find the FASTSim data directory location. The file can then be found and manually deleted.