Re-query this device's information from lsblk, updating all fields. This is useful after partitioning when the device's children have changed.
(&mut self)
| 306 | /// Re-query this device's information from lsblk, updating all fields. |
| 307 | /// This is useful after partitioning when the device's children have changed. |
| 308 | pub fn refresh(&mut self) -> Result<()> { |
| 309 | let path = self.path(); |
| 310 | let new_device = list_dev(Utf8Path::new(&path))?; |
| 311 | *self = new_device; |
| 312 | Ok(()) |
| 313 | } |
| 314 | |
| 315 | /// Read a sysfs property for this device and parse it as the target type. |
| 316 | fn read_sysfs_property<T>(&self, property: &str) -> Result<Option<T>> |
no test coverage detected