pub struct BashRunner<E, P> { /* private fields */ }Implementations§
Source§impl<E, P> BashRunner<E, P>where
E: CommandExecutor,
P: CommandPolicy,
impl<E, P> BashRunner<E, P>where
E: CommandExecutor,
P: CommandPolicy,
pub fn new(workspace_root: PathBuf, executor: E, policy: P) -> Result<Self>
pub fn from_workspace_paths<W>(
paths: &W,
executor: E,
policy: P,
) -> Result<Self>where
W: WorkspacePaths,
pub fn workspace_root(&self) -> &Path
pub fn working_dir(&self) -> &Path
pub fn shell_kind(&self) -> ShellKind
pub fn cd(&mut self, path: &str) -> Result<()>
pub fn ls(&self, path: Option<&str>, show_hidden: bool) -> Result<String>
pub fn pwd(&self) -> Result<String>
pub fn mkdir(&self, path: &str, parents: bool) -> Result<()>
pub fn rm(&self, path: &str, recursive: bool, force: bool) -> Result<()>
pub fn cp(&self, source: &str, dest: &str, recursive: bool) -> Result<()>
pub fn mv(&self, source: &str, dest: &str) -> Result<()>
pub fn grep( &self, pattern: &str, path: Option<&str>, recursive: bool, ) -> Result<String>
Auto Trait Implementations§
impl<E, P> Freeze for BashRunner<E, P>
impl<E, P> RefUnwindSafe for BashRunner<E, P>where
E: RefUnwindSafe,
P: RefUnwindSafe,
impl<E, P> Send for BashRunner<E, P>
impl<E, P> Sync for BashRunner<E, P>
impl<E, P> Unpin for BashRunner<E, P>
impl<E, P> UnwindSafe for BashRunner<E, P>where
E: UnwindSafe,
P: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more