1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//! Device helper functions for listing device backups and retrieving basic device information.
use Path;
use crate::;
/// Get basic device metadata for a specific UDID.
///
/// Reads and parses `Manifest.plist` from the provided device backup path to return lockdown info.
///
/// # Arguments
///
/// * `device_backup_path` - Path to a specific device UDID backup folder.
///
/// # Errors
/// Returns `BackupError::ManifestPlistNotFound` if `Manifest.plist` is missing,
/// or `BackupError::Plist` if parsing fails.
///
/// # Examples
///
/// ```no_run
/// use std::path::Path;
///
/// use crabapple::backup::device::get_device_basic_info;
///
/// let path = Path::new("/path/to/backup");
/// let info = get_device_basic_info(path).unwrap();
/// println!("Device name: {}", info.device_name);
/// ```