Prepare the path for OTA implementation
This commit is contained in:
@ -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)]
|
||||
|
Reference in New Issue
Block a user