I have a string input in the form "../../" or an alphabet like "a". I am passing the input to create_dir_all method to create a directory.I am looking for a way to deduce the path to the newly created directory from within Rust.
I have provided the example below. Lets say, my current working directory is 'usr' whose path is $HOME/user/Desktop/usr. From this current path, I do,
fs::create_dir_all("../m")?;
This will create a directory one level above my current directory. The path to m would be $HOME/user/Desktop/m. I would like to save this path within my Rust program for later usage.