Method DeleteLocalFile
DeleteLocalFile()
Deletes the locally cached model and all associated files. For LMK archives, reads the archive metadata to identify all extracted component files (base model, vision model, adapters) and deletes only those. For GGUF models, deletes the single file and its .origin metadata. The model directory is removed if it becomes empty.
public bool DeleteLocalFile()
Returns
- bool
trueif files were deleted;falseif the model was not locally available.
Exceptions
- IOException
Thrown if a file is in use or cannot be deleted.