Prepare the path for OTA implementation

This commit is contained in:
2024-10-03 21:16:51 +02:00
parent 436bcd5677
commit 06659404c1
3 changed files with 18 additions and 0 deletions

View File

@ -293,6 +293,16 @@ impl AppConfig {
pub fn log_of_day(&self, day: u64) -> PathBuf {
self.logs_dir().join(format!("{day}.log"))
}
/// Get the directory that will store OTA updates
pub fn ota_dir(&self) -> PathBuf {
self.logs_dir().join("ota")
}
/// Get the directory that will store OTA updates of a given device reference
pub fn ota_of_device(&self, dev_ref: &str) -> PathBuf {
self.ota_dir().join(dev_ref)
}
}
#[cfg(test)]