I want to rewrite a Bash script in Rust. The script is simple - it just creates/removes/modify directories and files and std::fs / tokio::fs has all the functionality I need.
The only problem is that the script works against a local Linux or a remote Linux host over SSH. The Bash script does all the work simply by executing touch, mkdir, etc. locally or remotely as ssh "$foobar" mkdir...
I tried openssh module and it works well.
But I wonder is there a smarter way that doesn't involve executing commands like this?