Merge branch 'master' into xpc-rewrite

This commit is contained in:
Jackson Coxson
2025-05-26 20:39:24 -06:00
committed by GitHub
6 changed files with 267 additions and 14 deletions

View File

@@ -79,13 +79,17 @@ impl CrashReportCopyMobileClient {
/// Lists crash report files in the root of the crash logs directory.
///
/// # Arguments
/// * `dir_path` - The directory to pull logs from. Default is /
///
/// # Returns
/// A list of filenames.
///
/// # Errors
/// Returns `IdeviceError` if listing the directory fails.
pub async fn ls(&mut self) -> Result<Vec<String>, IdeviceError> {
let mut res = self.afc_client.list_dir("/").await?;
pub async fn ls(&mut self, dir_path: Option<&str>) -> Result<Vec<String>, IdeviceError> {
let path = dir_path.unwrap_or("/");
let mut res = self.afc_client.list_dir(path).await?;
if res.len() > 2 {
if &res[0] == "." {
res.swap_remove(0);

View File

@@ -66,19 +66,19 @@ pub struct OsTraceRelayReceiver {
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct OsTraceLog {
pid: u32,
timestamp: NaiveDateTime,
level: LogLevel,
image_name: String,
filename: String,
message: String,
label: Option<SyslogLabel>,
pub pid: u32,
pub timestamp: NaiveDateTime,
pub level: LogLevel,
pub image_name: String,
pub filename: String,
pub message: String,
pub label: Option<SyslogLabel>,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct SyslogLabel {
subsystem: String,
category: String,
pub subsystem: String,
pub category: String,
}
#[derive(Debug, Clone, PartialEq, Eq)]