Skip to content

Commit

Permalink
Add new method to instantiate Delete command
Browse files Browse the repository at this point in the history
  • Loading branch information
Alfonso Ros committed Sep 3, 2021
1 parent 3e242b9 commit 1b14191
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/commands/delete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ pub struct Delete {
}

impl Delete {
/// instant Delete Command
pub fn new(container_id: String, force: bool) -> Self {
Self {
container_id,
force,
}
}

pub fn exec(&self, root_path: PathBuf, systemd_cgroup: bool) -> Result<()> {
log::debug!("start deleting {}", self.container_id);
// state of container is stored in a directory named as container id inside
Expand Down

0 comments on commit 1b14191

Please sign in to comment.