std::cmd
Convenience functions for running common system binaries.
-
The directories listed in the
PATH
environment 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
cp
command as:cp -rf <src> <dst>
Panics if the
cp
binary cannot be found or if it exits with a non-zero status code. -
git(*args: str) -> str
-
Equivalent to running the
git
command with the specified arguments.Returns the
git
command's standard output as a string.Panics if the
git
binary cannot be found or if it exits with a non-zero status code. -
make(*args: str) -> str
-
Equivalent to running the
make
command with the specified arguments.Returns the
make
command's standard output as a string.Panics if the
make
binary cannot be found or if it exits with a non-zero status code. -
mkdir(path: str)
-
Equivalent to running the
mkdir
command as:mkdir -p <path>
Panics if the
mkdir
binary cannot be found or if it exits with a non-zero status code. -
mv(src: str, dst: str)
-
Equivalent to running the
mv
command as:mv -f <src> <dst>
Panics if the
mv
binary cannot be found or if it exits with a non-zero status code. -
rm(path: str)
-
Equivalent to running the
rm
command as:rm -rf <path>
Panics if the
rm
binary cannot be found or if it exits with a non-zero status code.