Change the Working Directory of a Rust App
September 2025
Use set_current_dir to change the working directory of an app like cd on the command line:
use env;
use PathBuf;
Output:
successfully changed directory
end of line
Use set_current_dir to change the working directory of an app like cd on the command line:
use env;
use PathBuf;
successfully changed directory