std::cmd
Convenience functions for running common system binaries.
-
The directories listed in the
PATHenvironment variable will be searched for the named binaries. - Arguments are passed directly to the binary and don't need to be shell-escaped.
Functions
-
cp(src: str, dst: str) -
Equivalent to running the
cpcommand as:cp -rf <src> <dst>
Panics if the
cpbinary cannot be found or if it exits with a non-zero status code. -
git(*args: str) -> str -
Equivalent to running the
gitcommand with the specified arguments.Returns the
gitcommand's standard output as a string.Panics if the
gitbinary cannot be found or if it exits with a non-zero status code. -
make(*args: str) -> str -
Equivalent to running the
makecommand with the specified arguments.Returns the
makecommand's standard output as a string.Panics if the
makebinary cannot be found or if it exits with a non-zero status code. -
mkdir(path: str) -
Equivalent to running the
mkdircommand as:mkdir -p <path>
Panics if the
mkdirbinary cannot be found or if it exits with a non-zero status code. -
mv(src: str, dst: str) -
Equivalent to running the
mvcommand as:mv -f <src> <dst>
Panics if the
mvbinary cannot be found or if it exits with a non-zero status code. -
rm(path: str) -
Equivalent to running the
rmcommand as:rm -rf <path>
Panics if the
rmbinary cannot be found or if it exits with a non-zero status code.