mirror of
https://github.com/jkcoxson/idevice.git
synced 2026-03-02 22:46:14 +01:00
Merge branch 'master' into xpc-rewrite
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user