Get the list of OTA updates for a given platform
This commit is contained in:
@ -300,11 +300,14 @@ impl AppConfig {
|
||||
self.storage_path().join("ota")
|
||||
}
|
||||
|
||||
/// Get the directory that will store OTA updates for a given platform
|
||||
pub fn ota_platform_dir(&self, platform: OTAPlatform) -> PathBuf {
|
||||
self.ota_dir().join(platform.to_string())
|
||||
}
|
||||
|
||||
/// Get the path to the file that will contain an OTA update
|
||||
pub fn path_ota_update(&self, platform: OTAPlatform, version: &semver::Version) -> PathBuf {
|
||||
self.ota_dir()
|
||||
.join(platform.to_string())
|
||||
.join(version.to_string())
|
||||
self.ota_platform_dir(platform).join(version.to_string())
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user