partition_sim/commands/
fs.rs1use super::{Command, Commands};
2
3#[derive(Debug, Clone, Copy, PartialEq, Eq)]
7pub enum FsCommands {
8 Ls,
10}
11
12impl From<FsCommands> for Commands {
13 fn from(command: FsCommands) -> Self {
14 Self::Fs(command)
15 }
16}
17
18impl Command for FsCommands {
19 fn build<'session>(&self, session: &'session openssh::Session) -> openssh::Command<'session> {
20 match self {
21 Self::Ls => {
22 let mut command = session.command("ls");
23 command.arg("-l");
24 command.arg("-a");
25 command.arg("-h");
26 command
27 }
28 }
29 }
30}