fix: remove duplicate list command

This commit is contained in:
LIAUD Corentin
2025-04-13 17:09:22 +02:00
committed by Corentin LIAUD
parent 757b0f9523
commit 7fbea238c0
3 changed files with 174 additions and 195 deletions

View File

@@ -21,25 +21,6 @@ pub fn handle_local_commands(
Ok(())
}
LocalDeviceCommand::List { path } => {
let dirs = device.list(path)?;
for dir in dirs {
let list_item_type = match dir.item_type {
ADBListItemType::File => "File".to_string(),
ADBListItemType::Directory => "Dir".to_string(),
ADBListItemType::Symlink => "Symlink".to_string(),
};
log::info!(
"type: {}, name: {}, time: {}, size: {}, permissions: {:#o}",
list_item_type,
dir.name,
dir.time,
dir.size,
dir.permissions
);
}
Ok(())
}
LocalDeviceCommand::Logcat { path } => {
let writer: Box<dyn Write> = if let Some(path) = path {
let f = File::create(path)?;

View File

@@ -14,8 +14,6 @@ pub enum LocalCommand {
pub enum LocalDeviceCommand {
/// List available server features.
HostFeatures,
/// List a directory on device
List { path: String },
/// Get logs of device
Logcat {
/// Path to output file (created if not exists)