Can delete an OTA update
This commit is contained in:
@ -31,6 +31,13 @@ pub fn get_ota_update(platform: OTAPlatform, version: &semver::Version) -> anyho
|
||||
Ok(std::fs::read(path)?)
|
||||
}
|
||||
|
||||
/// Delete an OTA update
|
||||
pub fn delete_update(platform: OTAPlatform, version: &semver::Version) -> anyhow::Result<()> {
|
||||
let path = AppConfig::get().path_ota_update(platform, version);
|
||||
std::fs::remove_file(path)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Get the list of OTA software updates for a platform
|
||||
pub fn get_ota_updates_for_platform(platform: OTAPlatform) -> anyhow::Result<Vec<OTAUpdate>> {
|
||||
let ota_path = AppConfig::get().ota_platform_dir(platform);
|
||||
|
Reference in New Issue
Block a user